Changeset 203504 in webkit
- Timestamp:
- Jul 21, 2016, 9:02:52 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp (modified) (1 diff)
-
Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h (modified) (1 diff)
-
UIProcess/API/gtk/WebKitWebViewBase.cpp (modified) (1 diff)
-
UIProcess/gtk/RedirectedXCompositeWindow.cpp (modified) (2 diffs)
-
WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp (modified) (1 diff)
-
WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r203500 r203504 1 2016-07-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK][Threaded Compositor] WTR generates fully white images for pixel tests most of the time 4 https://bugs.webkit.org/show_bug.cgi?id=160016 5 6 Reviewed by Žan Doberšek. 7 8 WTR sends a force repaint message to the web process before taking a snapshot of the web view. With the threaded 9 compositor, the UI process is notified about the force repaint callback before the contents have been actually 10 painted. We need to ensure that the contents are rendered before the UI process is notified. 11 12 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: 13 (WebKit::ThreadedCompositor::forceRepaint): Synchronously render the layer tree. 14 * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h: 15 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 16 (webkitWebViewRenderAcceleratedCompositingResults): Always mark the redirected window surface as dirty before 17 rendering, since it can be modified by the web process at any time. 18 * UIProcess/gtk/RedirectedXCompositeWindow.cpp: 19 (WebKit::XDamageNotifier::add): 20 (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow): Do not mark the surface as dirty on every 21 damage since the view will do it before rendering. 22 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp: 23 (WebKit::ThreadedCoordinatedLayerTreeHost::forceRepaint): Call ThreadedCompositor::forceRepaint(). 24 * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h: 25 1 26 2016-07-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 27 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
r203497 r203504 186 186 } 187 187 188 void ThreadedCompositor::forceRepaint() 189 { 190 m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] { 191 renderLayerTree(); 192 }); 193 } 194 188 195 void ThreadedCompositor::didChangeVisibleRect() 189 196 { -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h
r203497 r203504 79 79 void invalidate(); 80 80 81 void forceRepaint(); 82 81 83 private: 82 84 ThreadedCompositor(Client*); -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
r203496 r203504 610 610 } 611 611 612 // The surface can be modified by the web process at any time, so we mark it 613 // as dirty to ensure we always render the updated contents as soon as possible. 614 cairo_surface_mark_dirty(surface); 612 615 cairo_rectangle(cr, clipRect->x, clipRect->y, clipRect->width, clipRect->height); 613 616 cairo_set_source_surface(cr, surface, 0, 0); -
trunk/Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp
r203500 r203504 57 57 } 58 58 59 void add(Window window, std::function<void()> notifyFunction)59 void add(Window window, std::function<void()>&& notifyFunction) 60 60 { 61 61 if (m_notifyFunctions.isEmpty()) … … 190 190 XMapWindow(m_display, m_window.get()); 191 191 192 xDamageNotifier().add(m_window.get(), [this, damageNotify = WTFMove(damageNotify)] { 193 // The surface has been modified by the web process, mark it as dirty. 194 if (m_surface) 195 cairo_surface_mark_dirty(m_surface.get()); 196 damageNotify(); 197 }); 192 xDamageNotifier().add(m_window.get(), WTFMove(damageNotify)); 198 193 199 194 while (1) { -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp
r203497 r203504 59 59 m_compositor->invalidate(); 60 60 CoordinatedLayerTreeHost::invalidate(); 61 } 62 63 void ThreadedCoordinatedLayerTreeHost::forceRepaint() 64 { 65 CoordinatedLayerTreeHost::forceRepaint(); 66 m_compositor->forceRepaint(); 61 67 } 62 68 -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h
r203497 r203504 62 62 void invalidate() override; 63 63 64 void forceRepaint() override; 65 bool forceRepaintAsync(uint64_t callbackID) override { return false; } 66 64 67 #if PLATFORM(GTK) 65 68 void setNativeSurfaceHandleForCompositing(uint64_t) override;
Note:
See TracChangeset
for help on using the changeset viewer.