mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
bug 1087048. Dispatch touch events after vsync aligned composites. r=benwa
This commit is contained in:
parent
f3b4fd4499
commit
06b697f7a6
@ -65,6 +65,10 @@
|
||||
#endif
|
||||
#include "mozilla/VsyncDispatcher.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "GeckoTouchDispatcher.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
@ -273,6 +277,8 @@ CompositorVsyncObserver::Composite(TimeStamp aVsyncTimestamp)
|
||||
// unregister the vsync.
|
||||
UnobserveVsync();
|
||||
}
|
||||
|
||||
DispatchTouchEvents(aVsyncTimestamp);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -302,6 +308,16 @@ CompositorVsyncObserver::UnobserveVsync()
|
||||
mIsObservingVsync = false;
|
||||
}
|
||||
|
||||
void
|
||||
CompositorVsyncObserver::DispatchTouchEvents(TimeStamp aVsyncTimestamp)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (gfxPrefs::TouchResampling()) {
|
||||
GeckoTouchDispatcher::NotifyVsync(aVsyncTimestamp);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CompositorParent::StartUp()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Should be on the main Thread!");
|
||||
|
@ -113,6 +113,7 @@ private:
|
||||
void NotifyCompositeTaskExecuted();
|
||||
void ObserveVsync();
|
||||
void UnobserveVsync();
|
||||
void DispatchTouchEvents(TimeStamp aVsyncTimestamp);
|
||||
|
||||
bool mNeedsComposite;
|
||||
bool mIsObservingVsync;
|
||||
|
Loading…
Reference in New Issue
Block a user