Title: [86713] trunk/Source/WebCore
Revision
86713
Author
[email protected]
Date
2011-05-17 15:34:22 -0700 (Tue, 17 May 2011)

Log Message

2011-05-17  Nat Duca  <[email protected]>

        Reviewed by James Robinson.

        [chromium] Always set layerRenderer, even on non-drawn-layers
        https://bugs.webkit.org/show_bug.cgi?id=60977

        This is a defensive fixe for crbug.com/82799, in which
        a RenderLayer could not prepare itself because its owning layerImpl
        had no associated layerRenderer. The underlying issue is that we
        sometimes put renderSurfaces onto the list that won't actually render.
        For now, the priority is to reduce fragility so that invisible layers
        dont lead to crashers. We do this by being more agressive about
        binding CCLayerImpls to the LayerRenderer, doing it all the time rather
        than only when we think it will get rendered.

        * platform/graphics/chromium/LayerRendererChromium.cpp:
        (WebCore::LayerRendererChromium::paintLayerContents):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (86712 => 86713)


--- trunk/Source/WebCore/ChangeLog	2011-05-17 22:32:47 UTC (rev 86712)
+++ trunk/Source/WebCore/ChangeLog	2011-05-17 22:34:22 UTC (rev 86713)
@@ -1,3 +1,22 @@
+2011-05-17  Nat Duca  <[email protected]>
+
+        Reviewed by James Robinson.
+
+        [chromium] Always set layerRenderer, even on non-drawn-layers
+        https://bugs.webkit.org/show_bug.cgi?id=60977
+
+        This is a defensive fixe for crbug.com/82799, in which
+        a RenderLayer could not prepare itself because its owning layerImpl
+        had no associated layerRenderer. The underlying issue is that we
+        sometimes put renderSurfaces onto the list that won't actually render.
+        For now, the priority is to reduce fragility so that invisible layers
+        dont lead to crashers. We do this by being more agressive about 
+        binding CCLayerImpls to the LayerRenderer, doing it all the time rather
+        than only when we think it will get rendered.
+
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::paintLayerContents):
+
 2011-05-17  Anders Carlsson  <[email protected]>
 
         Fix the clang build.

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


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-05-17 22:32:47 UTC (rev 86712)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-05-17 22:34:22 UTC (rev 86713)
@@ -355,6 +355,11 @@
         RenderSurfaceChromium* renderSurface = renderSurfaceLayer->renderSurface();
         ASSERT(renderSurface);
 
+        // Make sure any renderSurfaceLayer is associated with this layerRenderer.
+        // This is a defensive assignment in case the owner of this layer hasn't
+        // set the layerRenderer on this layer already.
+        renderSurfaceLayer->setLayerRenderer(this);
+
         // Render surfaces whose drawable area has zero width or height
         // will have no layers associated with them and should be skipped.
         if (!renderSurface->m_layerList.size())
@@ -371,10 +376,9 @@
                 continue;
 
             LayerChromium* layer = ccLayerImpl->owner();
-            if (layer->bounds().isEmpty())
-                continue;
 
             layer->setLayerRenderer(this);
+
             if (layer->maskLayer())
                 layer->maskLayer()->setLayerRenderer(this);
             if (layer->replicaLayer()) {
@@ -383,6 +387,9 @@
                     layer->replicaLayer()->maskLayer()->setLayerRenderer(this);
             }
 
+            if (layer->bounds().isEmpty())
+              continue;
+
             IntRect targetSurfaceRect = ccLayerImpl->targetRenderSurface() ? ccLayerImpl->targetRenderSurface()->contentRect() : m_defaultRenderSurface->contentRect();
             IntRect scissorRect = layer->ccLayerImpl()->scissorRect();
             if (!scissorRect.isEmpty())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to