Title: [107120] trunk
Revision
107120
Author
[email protected]
Date
2012-02-08 12:35:06 -0800 (Wed, 08 Feb 2012)

Log Message

[chromium] Disable root layer clears on release builds.
https://bugs.webkit.org/show_bug.cgi?id=77478

Patch by Jonathan Backer <[email protected]> on 2012-02-08
Reviewed by James Robinson.

Source/WebCore:

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::clearRenderSurface):
(WebCore::LayerRendererChromium::drawRenderPass):
* platform/graphics/chromium/LayerRendererChromium.h:
(LayerRendererChromium):

LayoutTests:

* platform/chromium-gpu-linux/fast/canvas/canvas-text-alignment-expected.png:
* platform/chromium-gpu-linux/media/video-zoom-expected.png:
* platform/chromium-linux/compositing/direct-image-compositing-expected.png:
* platform/chromium-linux/compositing/geometry/ancestor-overflow-change-expected.png:
* platform/chromium-linux/compositing/geometry/fixed-in-composited-expected.png:
* platform/chromium-linux/compositing/geometry/tall-page-composited-expected.png:
* platform/chromium-linux/compositing/masks/masked-ancestor-expected.png:
* platform/chromium-linux/compositing/masks/multiple-masks-expected.png:
* platform/chromium-linux/compositing/masks/simple-composited-mask-expected.png:
* platform/chromium-linux/compositing/scaling/tiled-layer-recursion-expected.png:
* platform/chromium-linux/platform/chromium/compositing/layout-width-change-expected.png:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (107119 => 107120)


--- trunk/LayoutTests/ChangeLog	2012-02-08 20:24:57 UTC (rev 107119)
+++ trunk/LayoutTests/ChangeLog	2012-02-08 20:35:06 UTC (rev 107120)
@@ -1,3 +1,22 @@
+2012-02-08  Jonathan Backer  <[email protected]>
+
+        [chromium] Disable root layer clears on release builds.
+        https://bugs.webkit.org/show_bug.cgi?id=77478
+
+        Reviewed by James Robinson.
+
+        * platform/chromium-gpu-linux/fast/canvas/canvas-text-alignment-expected.png:
+        * platform/chromium-gpu-linux/media/video-zoom-expected.png:
+        * platform/chromium-linux/compositing/direct-image-compositing-expected.png:
+        * platform/chromium-linux/compositing/geometry/ancestor-overflow-change-expected.png:
+        * platform/chromium-linux/compositing/geometry/fixed-in-composited-expected.png:
+        * platform/chromium-linux/compositing/geometry/tall-page-composited-expected.png:
+        * platform/chromium-linux/compositing/masks/masked-ancestor-expected.png:
+        * platform/chromium-linux/compositing/masks/multiple-masks-expected.png:
+        * platform/chromium-linux/compositing/masks/simple-composited-mask-expected.png:
+        * platform/chromium-linux/compositing/scaling/tiled-layer-recursion-expected.png:
+        * platform/chromium-linux/platform/chromium/compositing/layout-width-change-expected.png:
+
 2012-02-07  Andy Estes  <[email protected]>
 
         REGRESSION (r102983): ClicktoFlash drawing of old style youtube embeds missing until resize

Modified: trunk/LayoutTests/platform/chromium-gpu-linux/fast/canvas/canvas-text-alignment-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-gpu-linux/media/video-zoom-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/compositing/direct-image-compositing-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/compositing/geometry/ancestor-overflow-change-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/compositing/geometry/fixed-in-composited-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/compositing/geometry/tall-page-composited-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/compositing/masks/masked-ancestor-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/compositing/masks/multiple-masks-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/compositing/masks/simple-composited-mask-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/compositing/scaling/tiled-layer-recursion-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/chromium-linux/platform/chromium/compositing/layout-width-change-expected.png


(Binary files differ)

Modified: trunk/Source/WebCore/ChangeLog (107119 => 107120)


--- trunk/Source/WebCore/ChangeLog	2012-02-08 20:24:57 UTC (rev 107119)
+++ trunk/Source/WebCore/ChangeLog	2012-02-08 20:35:06 UTC (rev 107120)
@@ -1,3 +1,16 @@
+2012-02-08  Jonathan Backer  <[email protected]>
+
+        [chromium] Disable root layer clears on release builds.
+        https://bugs.webkit.org/show_bug.cgi?id=77478
+
+        Reviewed by James Robinson.
+
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::clearRenderSurface):
+        (WebCore::LayerRendererChromium::drawRenderPass):
+        * platform/graphics/chromium/LayerRendererChromium.h:
+        (LayerRendererChromium):
+
 2012-02-08  Anders Carlsson  <[email protected]>
 
         Add a content shadow layer to the render layer compositor

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (107119 => 107120)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2012-02-08 20:24:57 UTC (rev 107119)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2012-02-08 20:35:06 UTC (rev 107120)
@@ -306,9 +306,9 @@
     m_currentRenderSurface = 0;
 }
 
-void LayerRendererChromium::clearSurfaceForDebug(CCRenderSurface* renderSurface, CCRenderSurface* rootRenderSurface, const FloatRect& surfaceDamageRect)
+void LayerRendererChromium::clearRenderSurface(CCRenderSurface* renderSurface, CCRenderSurface* rootRenderSurface, const FloatRect& surfaceDamageRect)
 {
-    // Non-root layers should clear their entire contents to transparent. The root layer
+    // Non-root layers should clear their entire contents to transparent. On DEBUG builds, the root layer
     // is cleared to blue to easily see regions that were not drawn on the screen. If we
     // are using partial swap / scissor optimization, then the surface should only
     // clear the damaged region, so that we don't accidentally clear un-changed portions
@@ -324,7 +324,11 @@
     else
         GLC(m_context.get(), m_context->disable(GraphicsContext3D::SCISSOR_TEST));
 
-    m_context->clear(GraphicsContext3D::COLOR_BUFFER_BIT);
+#if defined(NDEBUG)
+    if (renderSurface != rootRenderSurface)
+#endif
+        m_context->clear(GraphicsContext3D::COLOR_BUFFER_BIT);
+
     GLC(m_context.get(), m_context->enable(GraphicsContext3D::SCISSOR_TEST));
 }
 
@@ -374,8 +378,7 @@
     if (!useRenderSurface(renderSurface))
         return;
 
-    // FIXME: eventually we should place this under a debug flag.
-    clearSurfaceForDebug(renderSurface, m_defaultRenderSurface, renderPass->surfaceDamageRect());
+    clearRenderSurface(renderSurface, m_defaultRenderSurface, renderPass->surfaceDamageRect());
 
     const CCQuadList& quadList = renderPass->quadList();
     for (size_t i = 0; i < quadList.size(); ++i)

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h (107119 => 107120)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h	2012-02-08 20:24:57 UTC (rev 107119)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h	2012-02-08 20:35:06 UTC (rev 107120)
@@ -173,7 +173,7 @@
     void setDrawViewportRect(const IntRect&, bool flipY);
 
     bool useRenderSurface(CCRenderSurface*);
-    void clearSurfaceForDebug(CCRenderSurface*, CCRenderSurface* rootRenderSurface, const FloatRect& surfaceDamageRect);
+    void clearRenderSurface(CCRenderSurface*, CCRenderSurface* rootRenderSurface, const FloatRect& surfaceDamageRect);
 
     void releaseRenderSurfaceTextures();
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to