Changeset 216970 in webkit
- Timestamp:
- May 17, 2017 12:18:56 AM (7 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r216967 r216970 1 2017-05-17 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [Threaded Compositor] SHOULD NEVER BE REACHED in WebKit::CompositingRunLoop::updateCompleted 4 https://bugs.webkit.org/show_bug.cgi?id=172167 5 6 Reviewed by Michael Catanzaro. 7 8 This is still happening, even after r216182, less often but still happens. There are two conditions in which 9 this can happen: 10 11 - Again in force repaint. r216182 fixed the case of force repaint called when update state is completed, but it 12 can also crash if update state is inProgress or PendingAfterCompletion when m_coordinateUpdateCompletionWithClient 13 is true. 14 - When the threaded compositor is invalidated right after renderLayerTree() starts, but before it finishes. 15 16 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: 17 (WebKit::ThreadedCompositor::invalidate): Invalidate the refresh monitor right after stopping updates in the 18 compositing run loop to ensure no more updates are scheduled. 19 (WebKit::ThreadedCompositor::renderLayerTree): Check the scene is still active before calling sceneUpdateFinished(). 20 (WebKit::ThreadedCompositor::updateSceneState): Do not update m_coordinateUpdateCompletionWithClient when in 21 force repaint. 22 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp: 23 (WebKit::ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback): Return early if the monitor has been invalidated. 24 1 25 2017-05-16 Sam Weinig <sam@webkit.org> 2 26 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
r216923 r216970 125 125 m_scene->detach(); 126 126 m_compositingRunLoop->stopUpdates(); 127 #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) 128 m_displayRefreshMonitor->invalidate(); 129 #endif 127 130 m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] { 128 131 m_scene->purgeGLResources(); … … 133 136 m_scene = nullptr; 134 137 }); 135 #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)136 m_displayRefreshMonitor->invalidate();137 #endif138 138 m_compositingRunLoop = nullptr; 139 #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)140 m_displayRefreshMonitor->invalidate();141 #endif142 139 } 143 140 … … 266 263 267 264 #if PLATFORM(GTK) 268 sceneUpdateFinished(); 265 if (m_scene->isActive()) 266 sceneUpdateFinished(); 269 267 #endif 270 268 } … … 290 288 291 289 m_clientRendersNextFrame.store(true); 290 // Do not change m_coordinateUpdateCompletionWithClient while in force repaint. 291 if (m_inForceRepaint) 292 return; 292 293 bool coordinateUpdate = std::any_of(state.layersToUpdate.begin(), state.layersToUpdate.end(), 293 294 [](const std::pair<CoordinatedLayerID, CoordinatedGraphicsLayerState>& it) { -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp
r216927 r216970 68 68 void ThreadedDisplayRefreshMonitor::dispatchDisplayRefreshCallback() 69 69 { 70 if (!m_compositor) 71 return; 70 72 m_displayRefreshTimer.startOneShot(0); 71 73 }
Note: See TracChangeset
for help on using the changeset viewer.