WebKit Bugzilla
Attachment 345762 Details for
Bug 188005
: [GTK][WPE] Improve the way request displayRefresh notifications
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188005-20180725180905.patch (text/plain), 22.10 KB, created by
Miguel Gomez
on 2018-07-25 09:09:07 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Miguel Gomez
Created:
2018-07-25 09:09:07 PDT
Size:
22.10 KB
patch
obsolete
>Subversion Revision: 234194 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4053c11da92aea9adc7fe8b6ac70db31f0d514ea..b7afed86df3daa137f3aa245aff7ca1aa84c79e3 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,47 @@ >+2018-07-25 Miguel Gomez <magomez@igalia.com> >+ >+ [GTK][WPE] Improve the way request displayRefresh notifications >+ https://bugs.webkit.org/show_bug.cgi?id=188005 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a new interface ThreadedDisplayRefreshMonitor::Client and use it to pipe the the >+ requestDisplayRefreshMonitorUpdate and handleDisplayRefreshMonitorUpdate to the >+ ThreadedCoordinatedLayerTreeHost. >+ >+ In response to requestDisplayRefreshMonitorUpdate, the LayerTreeHost will force a layer >+ flush that in the end causes a repaint, which generates the requested display refresh >+ event. >+ >+ In response to handleDisplayRefreshMonitorUpdate, the call to renderNextFrame will happen, >+ and if the DisplayRefreshMonitor has been rescheduled, renderNextFrame will also force >+ a new layer flush, causing the repaint that will generate the display refreh event. >+ >+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: >+ (WebKit::ThreadedCompositor::create): >+ (WebKit::ThreadedCompositor::ThreadedCompositor): >+ (WebKit::m_displayRefreshMonitor): >+ (WebKit::ThreadedCompositor::handleDisplayRefreshMonitorUpdate): >+ (WebKit::ThreadedCompositor::requestDisplayRefreshMonitorUpdate): Deleted. >+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: >+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp: >+ (WebKit::ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor): >+ (WebKit::ThreadedDisplayRefreshMonitor::requestRefreshCallback): >+ (WebKit::ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback): >+ (WebKit::ThreadedDisplayRefreshMonitor::invalidate): >+ (WebKit::ThreadedDisplayRefreshMonitor::displayRefreshCallback): >+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h: >+ (WebKit::ThreadedDisplayRefreshMonitor::create): >+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: >+ (WebKit::CoordinatedLayerTreeHost::renderNextFrame): >+ (WebKit::CoordinatedLayerTreeHost::flushLayersAndForceRepaint): >+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: >+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp: >+ (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): >+ (WebKit::ThreadedCoordinatedLayerTreeHost::requestDisplayRefreshMonitorUpdate): >+ (WebKit::ThreadedCoordinatedLayerTreeHost::handleDisplayRefreshMonitorUpdate): >+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h: >+ > 2018-07-24 Tim Horton <timothy_horton@apple.com> > > Enable Web Content Filtering on watchOS >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >index 6f1ff2c93e7a619853a2a687a86186c1d6a55756..2cdc1ffb9a375aa65063d8ec5d6f5d0d9b781c0e 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >+++ b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >@@ -45,18 +45,18 @@ > namespace WebKit { > using namespace WebCore; > >-Ref<ThreadedCompositor> ThreadedCompositor::create(Client& client, PlatformDisplayID displayID, const IntSize& viewportSize, float scaleFactor, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags) >+Ref<ThreadedCompositor> ThreadedCompositor::create(Client& client, ThreadedDisplayRefreshMonitor::Client& displayRefreshMonitorClient, PlatformDisplayID displayID, const IntSize& viewportSize, float scaleFactor, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags) > { >- return adoptRef(*new ThreadedCompositor(client, displayID, viewportSize, scaleFactor, doFrameSync, paintFlags)); >+ return adoptRef(*new ThreadedCompositor(client, displayRefreshMonitorClient, displayID, viewportSize, scaleFactor, doFrameSync, paintFlags)); > } > >-ThreadedCompositor::ThreadedCompositor(Client& client, PlatformDisplayID displayID, const IntSize& viewportSize, float scaleFactor, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags) >+ThreadedCompositor::ThreadedCompositor(Client& client, ThreadedDisplayRefreshMonitor::Client& displayRefreshMonitorClient, PlatformDisplayID displayID, const IntSize& viewportSize, float scaleFactor, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags) > : m_client(client) > , m_doFrameSync(doFrameSync) > , m_paintFlags(paintFlags) > , m_compositingRunLoop(std::make_unique<CompositingRunLoop>([this] { renderLayerTree(); })) > #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >- , m_displayRefreshMonitor(ThreadedDisplayRefreshMonitor::create(displayID, *this)) >+ , m_displayRefreshMonitor(ThreadedDisplayRefreshMonitor::create(displayID, displayRefreshMonitorClient)) > #endif > { > { >@@ -304,22 +304,7 @@ RefPtr<WebCore::DisplayRefreshMonitor> ThreadedCompositor::displayRefreshMonitor > return m_displayRefreshMonitor.copyRef(); > } > >-void ThreadedCompositor::requestDisplayRefreshMonitorUpdate() >-{ >- // This is invoked by ThreadedDisplayRefreshMonitor when a fresh update is required. >- >- LockHolder stateLocker(m_compositingRunLoop->stateLock()); >- { >- // coordinateUpdateCompletionWithClient is set to true in order to delay the scene update >- // completion until the DisplayRefreshMonitor is fired on the main thread after the composition >- // is completed. >- LockHolder locker(m_attributes.lock); >- m_attributes.coordinateUpdateCompletionWithClient = true; >- } >- m_compositingRunLoop->scheduleUpdate(stateLocker); >-} >- >-void ThreadedCompositor::handleDisplayRefreshMonitorUpdate(bool hasBeenRescheduled) >+void ThreadedCompositor::handleDisplayRefreshMonitorUpdate() > { > // Retrieve coordinateUpdateCompletionWithClient. > bool coordinateUpdateCompletionWithClient { false }; >@@ -328,12 +313,6 @@ void ThreadedCompositor::handleDisplayRefreshMonitorUpdate(bool hasBeenReschedul > coordinateUpdateCompletionWithClient = std::exchange(m_attributes.coordinateUpdateCompletionWithClient, false); > } > >- // The client is finally notified about the scene update nearing completion. The client will use this >- // opportunity to clean up resources as appropriate. It can also perform any layer flush that was >- // requested during the composition, or by any DisplayRefreshMonitor notifications that have been >- // handled at this point. >- m_client.renderNextFrame(); >- > LockHolder stateLocker(m_compositingRunLoop->stateLock()); > > // If required, mark the current scene update as completed. CompositingRunLoop will take care of >@@ -341,16 +320,6 @@ void ThreadedCompositor::handleDisplayRefreshMonitorUpdate(bool hasBeenReschedul > // or DisplayRefreshMonitor notifications. > if (coordinateUpdateCompletionWithClient) > m_compositingRunLoop->updateCompleted(stateLocker); >- >- // If the DisplayRefreshMonitor was scheduled again, we immediately demand the update completion >- // coordination (like we do in requestDisplayRefreshMonitorUpdate()) and request an update. >- if (hasBeenRescheduled) { >- { >- LockHolder locker(m_attributes.lock); >- m_attributes.coordinateUpdateCompletionWithClient = true; >- } >- m_compositingRunLoop->scheduleUpdate(stateLocker); >- } > } > #endif > >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h >index 037fd770c4312a9ec80169033c1de9313d1ec9b7..42b246d2b069d641b739bd5c831ceee3e59deee4 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h >+++ b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h >@@ -39,14 +39,13 @@ > #include <wtf/ThreadSafeRefCounted.h> > > #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >-#include <WebCore/DisplayRefreshMonitor.h> >+#include "ThreadedDisplayRefreshMonitor.h" > #endif > > namespace WebKit { > > class CoordinatedGraphicsScene; > class CoordinatedGraphicsSceneClient; >-class ThreadedDisplayRefreshMonitor; > > class ThreadedCompositor : public CoordinatedGraphicsSceneClient, public ThreadSafeRefCounted<ThreadedCompositor> { > WTF_MAKE_NONCOPYABLE(ThreadedCompositor); >@@ -54,8 +53,6 @@ class ThreadedCompositor : public CoordinatedGraphicsSceneClient, public ThreadS > public: > class Client { > public: >- virtual void renderNextFrame() = 0; >- > virtual uint64_t nativeSurfaceHandleForCompositing() = 0; > virtual void didDestroyGLContext() = 0; > >@@ -65,7 +62,7 @@ public: > > enum class ShouldDoFrameSync { No, Yes }; > >- static Ref<ThreadedCompositor> create(Client&, WebCore::PlatformDisplayID, const WebCore::IntSize&, float scaleFactor, ShouldDoFrameSync = ShouldDoFrameSync::Yes, WebCore::TextureMapper::PaintFlags = 0); >+ static Ref<ThreadedCompositor> create(Client&, ThreadedDisplayRefreshMonitor::Client&, WebCore::PlatformDisplayID, const WebCore::IntSize&, float scaleFactor, ShouldDoFrameSync = ShouldDoFrameSync::Yes, WebCore::TextureMapper::PaintFlags = 0); > virtual ~ThreadedCompositor(); > > void setNativeSurfaceHandleForCompositing(uint64_t); >@@ -82,14 +79,13 @@ public: > > #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) > RefPtr<WebCore::DisplayRefreshMonitor> displayRefreshMonitor(WebCore::PlatformDisplayID); >- void requestDisplayRefreshMonitorUpdate(); >- void handleDisplayRefreshMonitorUpdate(bool hasBeenRescheduled); >+ void handleDisplayRefreshMonitorUpdate(); > #endif > > void frameComplete(); > > private: >- ThreadedCompositor(Client&, WebCore::PlatformDisplayID, const WebCore::IntSize&, float scaleFactor, ShouldDoFrameSync, WebCore::TextureMapper::PaintFlags); >+ ThreadedCompositor(Client&, ThreadedDisplayRefreshMonitor::Client&, WebCore::PlatformDisplayID, const WebCore::IntSize&, float scaleFactor, ShouldDoFrameSync, WebCore::TextureMapper::PaintFlags); > > // CoordinatedGraphicsSceneClient > void updateViewport() override; >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp >index 51487b998c369e21cc809d185b33d06f218cdd1f..d088f28152d713a619e3611a7e31dafaff79d95d 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp >+++ b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp >@@ -37,10 +37,10 @@ > > namespace WebKit { > >-ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor(WebCore::PlatformDisplayID displayID, ThreadedCompositor& compositor) >+ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor(WebCore::PlatformDisplayID displayID, Client& client) > : WebCore::DisplayRefreshMonitor(displayID) > , m_displayRefreshTimer(RunLoop::main(), this, &ThreadedDisplayRefreshMonitor::displayRefreshCallback) >- , m_compositor(&compositor) >+ , m_client(&client) > { > #if USE(GLIB_EVENT_LOOP) > m_displayRefreshTimer.setPriority(RunLoopSourcePriority::DisplayRefreshMonitorTimer); >@@ -50,7 +50,7 @@ ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor(WebCore::PlatformDi > > bool ThreadedDisplayRefreshMonitor::requestRefreshCallback() > { >- if (!m_compositor) >+ if (!m_client) > return false; > > bool previousFrameDone { false }; >@@ -64,7 +64,7 @@ bool ThreadedDisplayRefreshMonitor::requestRefreshCallback() > // refresh notifications under ThreadedDisplayRefreshMonitor::displayRefreshCallback(). > // Any such schedule request is handled in that method after the notifications. > if (previousFrameDone) >- m_compositor->requestDisplayRefreshMonitorUpdate(); >+ m_client->requestDisplayRefreshMonitorUpdate(); > > return true; > } >@@ -77,7 +77,7 @@ bool ThreadedDisplayRefreshMonitor::requiresDisplayRefreshCallback() > > void ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback() > { >- if (!m_compositor) >+ if (!m_client) > return; > m_displayRefreshTimer.startOneShot(0_s); > } >@@ -85,7 +85,7 @@ void ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback() > void ThreadedDisplayRefreshMonitor::invalidate() > { > m_displayRefreshTimer.stop(); >- m_compositor = nullptr; >+ m_client = nullptr; > } > > void ThreadedDisplayRefreshMonitor::displayRefreshCallback() >@@ -111,8 +111,8 @@ void ThreadedDisplayRefreshMonitor::displayRefreshCallback() > // Notify the compositor about the completed DisplayRefreshMonitor update, passing > // along information about any schedule request that might have occurred during > // the notification handling. >- if (m_compositor) >- m_compositor->handleDisplayRefreshMonitorUpdate(hasBeenRescheduled); >+ if (m_client) >+ m_client->handleDisplayRefreshMonitorUpdate(hasBeenRescheduled); > } > > } // namespace WebKit >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h >index d0b07f316e345b755ac2406ffa0103f232ed2fbd..487e66074f279321bf89eba3ab9ef80914a3d333 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h >+++ b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h >@@ -36,9 +36,15 @@ class ThreadedCompositor; > > class ThreadedDisplayRefreshMonitor : public WebCore::DisplayRefreshMonitor { > public: >- static Ref<ThreadedDisplayRefreshMonitor> create(WebCore::PlatformDisplayID displayID, ThreadedCompositor& compositor) >+ class Client { >+ public: >+ virtual void requestDisplayRefreshMonitorUpdate() = 0; >+ virtual void handleDisplayRefreshMonitorUpdate(bool) = 0; >+ }; >+ >+ static Ref<ThreadedDisplayRefreshMonitor> create(WebCore::PlatformDisplayID displayID, Client& client) > { >- return adoptRef(*new ThreadedDisplayRefreshMonitor(displayID, compositor)); >+ return adoptRef(*new ThreadedDisplayRefreshMonitor(displayID, client)); > } > virtual ~ThreadedDisplayRefreshMonitor() = default; > >@@ -49,11 +55,11 @@ public: > void invalidate(); > > private: >- ThreadedDisplayRefreshMonitor(WebCore::PlatformDisplayID, ThreadedCompositor&); >+ ThreadedDisplayRefreshMonitor(WebCore::PlatformDisplayID, Client&); > > void displayRefreshCallback(); > RunLoop::Timer<ThreadedDisplayRefreshMonitor> m_displayRefreshTimer; >- ThreadedCompositor* m_compositor; >+ Client* m_client; > }; > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp >index 75123c977b6c92f8cdb43f792068ee2a5ce9187e..7092fc5320b81bb94d66036872ba90fb40324f0f 100644 >--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp >+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp >@@ -145,7 +145,7 @@ void CoordinatedLayerTreeHost::setVisibleContentsRect(const FloatRect& rect) > scheduleLayerFlush(); > } > >-void CoordinatedLayerTreeHost::renderNextFrame() >+void CoordinatedLayerTreeHost::renderNextFrame(bool forceRepaint) > { > m_isWaitingForRenderer = false; > bool scheduledWhileWaitingForRenderer = std::exchange(m_scheduledWhileWaitingForRenderer, false); >@@ -167,8 +167,10 @@ void CoordinatedLayerTreeHost::renderNextFrame() > m_forceRepaintAsync.needsFreshFlush = false; > } > >- if (scheduledWhileWaitingForRenderer || m_layerFlushTimer.isActive()) { >+ if (scheduledWhileWaitingForRenderer || m_layerFlushTimer.isActive() || forceRepaint) { > m_layerFlushTimer.stop(); >+ if (forceRepaint) >+ m_coordinator.forceFrameSync(); > layerFlushTimerFired(); > } > } >@@ -209,6 +211,15 @@ void CoordinatedLayerTreeHost::commitSceneState(const CoordinatedGraphicsState& > m_isWaitingForRenderer = true; > } > >+void CoordinatedLayerTreeHost::flushLayersAndForceRepaint() >+{ >+ if (m_layerFlushTimer.isActive()) >+ m_layerFlushTimer.stop(); >+ >+ m_coordinator.forceFrameSync(); >+ layerFlushTimerFired(); >+} >+ > void CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged() > { > m_coordinator.deviceOrPageScaleFactorChanged(); >diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h >index 5061b75dda9defb8e31e315eaa6b3d10f3806bf6..0a8bec8a3986cea2a80da50992aba2a831c3536a 100644 >--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h >+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h >@@ -58,7 +58,7 @@ protected: > void pageBackgroundTransparencyChanged() override; > > void setVisibleContentsRect(const WebCore::FloatRect&); >- void renderNextFrame(); >+ void renderNextFrame(bool); > > WebCore::GraphicsLayerFactory* graphicsLayerFactory() override; > >@@ -71,6 +71,8 @@ protected: > void notifyFlushRequired() override { scheduleLayerFlush(); }; > void commitSceneState(const WebCore::CoordinatedGraphicsState&) override; > >+ void flushLayersAndForceRepaint(); >+ > private: > void layerFlushTimerFired(); > >diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp >index 5419851e112708a63b385cfd66d0c7a464199fdc..d99f16bce750597448b1da79779bb358dfd38f7a 100644 >--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp >+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp >@@ -77,10 +77,10 @@ ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost(WebPage& webP > if (m_surface->shouldPaintMirrored()) > paintFlags |= TextureMapper::PaintingMirrored; > >- m_compositor = ThreadedCompositor::create(m_compositorClient, compositingDisplayID, scaledSize, scaleFactor, ThreadedCompositor::ShouldDoFrameSync::Yes, paintFlags); >+ m_compositor = ThreadedCompositor::create(m_compositorClient, m_compositorClient, compositingDisplayID, scaledSize, scaleFactor, ThreadedCompositor::ShouldDoFrameSync::Yes, paintFlags); > m_layerTreeContext.contextID = m_surface->surfaceID(); > } else >- m_compositor = ThreadedCompositor::create(m_compositorClient, compositingDisplayID, scaledSize, scaleFactor); >+ m_compositor = ThreadedCompositor::create(m_compositorClient, m_compositorClient, compositingDisplayID, scaledSize, scaleFactor); > > m_webPage.windowScreenDidChange(compositingDisplayID); > >@@ -105,6 +105,22 @@ void ThreadedCoordinatedLayerTreeHost::frameComplete() > m_compositor->frameComplete(); > } > >+void ThreadedCoordinatedLayerTreeHost::requestDisplayRefreshMonitorUpdate() >+{ >+ // Flush layers to cause a repaint. If m_isWaitingForRenderer was true at this point, the layer >+ // flush won't do anything, but that means there's a painting ongoing that will send the >+ // display refresh notification when it's done. >+ flushLayersAndForceRepaint(); >+} >+ >+void ThreadedCoordinatedLayerTreeHost::handleDisplayRefreshMonitorUpdate(bool hasBeenRescheduled) >+{ >+ // Call renderNextFrame. If hasBeenRescheduled is true, the layer flush will force a repaint >+ // that will cause the display refresh notification to come. >+ renderNextFrame(hasBeenRescheduled); >+ m_compositor->handleDisplayRefreshMonitorUpdate(); >+} >+ > uint64_t ThreadedCoordinatedLayerTreeHost::nativeSurfaceHandleForCompositing() > { > if (!m_surface) >diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h >index 629ddaf61a70281fb088ebc1cff4fc68aaee71a1..87a7da717cdd9a4e11585a72245dc6cece2fb5b1 100644 >--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h >+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h >@@ -33,6 +33,7 @@ > #include "CoordinatedLayerTreeHost.h" > #include "SimpleViewportController.h" > #include "ThreadedCompositor.h" >+#include "ThreadedDisplayRefreshMonitor.h" > #include <wtf/OptionSet.h> > > namespace WebCore { >@@ -71,7 +72,7 @@ private: > void setNativeSurfaceHandleForCompositing(uint64_t) override; > #endif > >- class CompositorClient final : public ThreadedCompositor::Client { >+ class CompositorClient final : public ThreadedCompositor::Client, public ThreadedDisplayRefreshMonitor::Client { > WTF_MAKE_NONCOPYABLE(CompositorClient); > public: > CompositorClient(ThreadedCoordinatedLayerTreeHost& layerTreeHost) >@@ -80,11 +81,6 @@ private: > } > > private: >- void renderNextFrame() override >- { >- m_layerTreeHost.renderNextFrame(); >- } >- > uint64_t nativeSurfaceHandleForCompositing() override > { > return m_layerTreeHost.nativeSurfaceHandleForCompositing(); >@@ -105,6 +101,16 @@ private: > m_layerTreeHost.didRenderFrame(); > } > >+ void requestDisplayRefreshMonitorUpdate() override >+ { >+ m_layerTreeHost.requestDisplayRefreshMonitorUpdate(); >+ } >+ >+ void handleDisplayRefreshMonitorUpdate(bool hasBeenRescheduled) >+ { >+ m_layerTreeHost.handleDisplayRefreshMonitorUpdate(hasBeenRescheduled); >+ } >+ > ThreadedCoordinatedLayerTreeHost& m_layerTreeHost; > }; > >@@ -125,6 +131,8 @@ private: > void didDestroyGLContext(); > void willRenderFrame(); > void didRenderFrame(); >+ void requestDisplayRefreshMonitorUpdate(); >+ void handleDisplayRefreshMonitorUpdate(bool); > > enum class DiscardableSyncActions { > UpdateSize = 1 << 1,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188005
: 345762