mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1123734 - Notify global VsyncSource in hwc. r=mwu, r=mchang
This commit is contained in:
parent
fe956ab5f2
commit
9614ef8ceb
@ -30,7 +30,8 @@
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "cutils/properties.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "nsWindow.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "VsyncSource.h"
|
||||
|
||||
#if ANDROID_VERSION >= 17
|
||||
#include "libdisplay/FramebufferSurface.h"
|
||||
@ -227,7 +228,8 @@ HwcComposer2D::Vsync(int aDisplay, nsecs_t aVsyncTimestamp)
|
||||
LOGE("Non-uniform vsync interval: %lld\n", vsyncInterval);
|
||||
}
|
||||
mLastVsyncTime = aVsyncTimestamp;
|
||||
nsWindow::NotifyVsync(vsyncTime);
|
||||
|
||||
gfxPlatform::GetPlatform()->GetHardwareVsync()->GetGlobalDisplay().NotifyVsync(vsyncTime);
|
||||
}
|
||||
|
||||
// Called on the "invalidator" thread (run from HAL).
|
||||
|
@ -215,21 +215,6 @@ nsWindow::DoDraw(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
nsWindow::NotifyVsync(TimeStamp aVsyncTimestamp)
|
||||
{
|
||||
if (!gFocusedWindow) {
|
||||
return;
|
||||
}
|
||||
|
||||
CompositorVsyncDispatcher* vsyncDispatcher = gFocusedWindow->GetCompositorVsyncDispatcher();
|
||||
// During bootup, there is a delay between when the nsWindow is created
|
||||
// and when the Compositor is created, but vsync is already turned on
|
||||
if (vsyncDispatcher) {
|
||||
vsyncDispatcher->NotifyVsync(aVsyncTimestamp);
|
||||
}
|
||||
}
|
||||
|
||||
/*static*/ nsEventStatus
|
||||
nsWindow::DispatchInputEvent(WidgetGUIEvent& aEvent)
|
||||
{
|
||||
|
@ -50,7 +50,6 @@ public:
|
||||
nsWindow();
|
||||
virtual ~nsWindow();
|
||||
|
||||
static void NotifyVsync(mozilla::TimeStamp aVsyncTimestamp);
|
||||
static void DoDraw(void);
|
||||
static nsEventStatus DispatchInputEvent(mozilla::WidgetGUIEvent& aEvent);
|
||||
static void DispatchTouchInput(mozilla::MultiTouchInput& aInput);
|
||||
|
Loading…
Reference in New Issue
Block a user