mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 552020. Part 2. Enable Vsync Profiler Markers across platforms. r=benwa
This commit is contained in:
parent
df02e7e840
commit
1afc3f21b7
@ -1330,7 +1330,7 @@ InsertVsyncProfilerMarker(TimeStamp aVsyncTimestamp)
|
||||
/*static */ void
|
||||
CompositorParent::PostInsertVsyncProfilerMarker(TimeStamp aVsyncTimestamp)
|
||||
{
|
||||
if (profiler_is_active()) {
|
||||
if (profiler_is_active() && sCompositorThreadHolder) {
|
||||
CompositorLoop()->PostTask(FROM_HERE,
|
||||
NewRunnableFunction(InsertVsyncProfilerMarker, aVsyncTimestamp));
|
||||
}
|
||||
|
@ -8,6 +8,11 @@
|
||||
#include "mozilla/layers/CompositorParent.h"
|
||||
#include "gfxPrefs.h"
|
||||
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
#include "GeckoProfiler.h"
|
||||
#include "ProfilerMarkers.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "GeckoTouchDispatcher.h"
|
||||
#endif
|
||||
@ -63,6 +68,12 @@ void
|
||||
VsyncDispatcher::NotifyVsync(TimeStamp aVsyncTimestamp)
|
||||
{
|
||||
bool notifiedCompositors = false;
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
if (profiler_is_active()) {
|
||||
CompositorParent::PostInsertVsyncProfilerMarker(aVsyncTimestamp);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gfxPrefs::VsyncAlignedCompositor()) {
|
||||
MutexAutoLock lock(mCompositorObserverLock);
|
||||
notifiedCompositors = NotifyVsyncObservers(aVsyncTimestamp, mCompositorObservers);
|
||||
|
@ -29,12 +29,6 @@
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "cutils/properties.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "GeckoTouchDispatcher.h"
|
||||
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
#include "GeckoProfiler.h"
|
||||
#include "ProfilerMarkers.h"
|
||||
#endif
|
||||
|
||||
#if ANDROID_VERSION >= 17
|
||||
#include "libdisplay/FramebufferSurface.h"
|
||||
@ -243,13 +237,6 @@ HwcComposer2D::Vsync(int aDisplay, nsecs_t aVsyncTimestamp)
|
||||
LOGE("Non-uniform vsync interval: %lld\n", vsyncInterval);
|
||||
}
|
||||
mLastVsyncTime = aVsyncTimestamp;
|
||||
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
if (profiler_is_active()) {
|
||||
CompositorParent::PostInsertVsyncProfilerMarker(vsyncTime);
|
||||
}
|
||||
#endif
|
||||
|
||||
VsyncDispatcher::GetInstance()->NotifyVsync(vsyncTime);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user