Title: [121250] trunk/Source/WebCore
Revision
121250
Author
[email protected]
Date
2012-06-26 03:19:20 -0700 (Tue, 26 Jun 2012)

Log Message

[Qt] GraphicsSurface: Fix tile update artifacts on Mac
https://bugs.webkit.org/show_bug.cgi?id=89887

Reviewed by Noam Rosenthal.

* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
(WebCore::GraphicsSurface::platformCopyToGLTexture):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (121249 => 121250)


--- trunk/Source/WebCore/ChangeLog	2012-06-26 10:17:44 UTC (rev 121249)
+++ trunk/Source/WebCore/ChangeLog	2012-06-26 10:19:20 UTC (rev 121250)
@@ -1,5 +1,15 @@
 2012-06-25  Jocelyn Turcotte  <[email protected]>
 
+        [Qt] GraphicsSurface: Fix tile update artifacts on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=89887
+
+        Reviewed by Noam Rosenthal.
+
+        * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
+        (WebCore::GraphicsSurface::platformCopyToGLTexture):
+
+2012-06-25  Jocelyn Turcotte  <[email protected]>
+
         GraphicsSurface: Fix IOSurfaceLock failures on Intel video cards.
         https://bugs.webkit.org/show_bug.cgi?id=89883
 

Modified: trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp (121249 => 121250)


--- trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp	2012-06-26 10:17:44 UTC (rev 121249)
+++ trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp	2012-06-26 10:19:20 UTC (rev 121250)
@@ -88,6 +88,12 @@
     glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE_ARB, 0, 0);
     glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
     glPopAttrib();
+
+    // According to IOSurface's documentation, glBindFramebuffer is the one triggering an update of the surface's cache.
+    // If the web process starts rendering and unlocks the surface before this happens, we might copy contents
+    // of the currently rendering frame on our texture instead of the previously completed frame.
+    // Flush the command buffer to reduce the odds of this happening, this would not be necessary with double buffering.
+    glFlush();
 }
 
 void GraphicsSurface::platformCopyFromFramebuffer(uint32_t originFbo, const IntRect& sourceRect)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to