Bug 1140578 - Simplify some code. r=mchang

This commit is contained in:
Kartikaya Gupta 2015-03-09 12:46:04 -04:00
parent 47aecf73bc
commit a7d9fcaed7

View File

@ -111,18 +111,11 @@ GeckoTouchDispatcher::NotifyTouch(MultiTouchInput& aTouch, TimeStamp aEventTime)
if (aTouch.mType == MultiTouchInput::MULTITOUCH_MOVE) { if (aTouch.mType == MultiTouchInput::MULTITOUCH_MOVE) {
MutexAutoLock lock(mTouchQueueLock); MutexAutoLock lock(mTouchQueueLock);
mTouchMoveEvents.push_back(aTouch);
if (mResamplingEnabled) { if (mResamplingEnabled) {
mTouchMoveEvents.push_back(aTouch);
return; return;
} }
if (mTouchMoveEvents.empty()) {
mTouchMoveEvents.push_back(aTouch);
} else {
// Coalesce touch move events
mTouchMoveEvents.back() = aTouch;
}
layers::APZThreadUtils::RunOnControllerThread(NewRunnableMethod( layers::APZThreadUtils::RunOnControllerThread(NewRunnableMethod(
this, &GeckoTouchDispatcher::DispatchTouchMoveEvents, TimeStamp::Now())); this, &GeckoTouchDispatcher::DispatchTouchMoveEvents, TimeStamp::Now()));
} else { } else {