Title: [119051] branches/safari-536-branch

Diff

Modified: branches/safari-536-branch/LayoutTests/compositing/geometry/preserve-3d-switching-expected.txt (119050 => 119051)


--- branches/safari-536-branch/LayoutTests/compositing/geometry/preserve-3d-switching-expected.txt	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/LayoutTests/compositing/geometry/preserve-3d-switching-expected.txt	2012-05-31 04:30:56 UTC (rev 119051)
@@ -10,6 +10,7 @@
         (GraphicsLayer
           (position 108.00 73.00)
           (bounds 304.00 304.00)
+          (drawsContent 1)
           (childrenTransform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 -0.00] [0.00 0.00 0.00 1.00])
           (children 1
             (GraphicsLayer

Deleted: branches/safari-536-branch/LayoutTests/compositing/visibility/layer-visible-content-expected.png


(Binary files differ)

Modified: branches/safari-536-branch/LayoutTests/compositing/visibility/layer-visible-content-expected.txt (119050 => 119051)


--- branches/safari-536-branch/LayoutTests/compositing/visibility/layer-visible-content-expected.txt	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/LayoutTests/compositing/visibility/layer-visible-content-expected.txt	2012-05-31 04:30:56 UTC (rev 119051)
@@ -6,6 +6,7 @@
       (children 2
         (GraphicsLayer
           (bounds 200.00 200.00)
+          (drawsContent 1)
           (children 1
             (GraphicsLayer
               (bounds 200.00 200.00)

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.cpp (119050 => 119051)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.cpp	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.cpp	2012-05-31 04:30:56 UTC (rev 119051)
@@ -965,19 +965,6 @@
          
     return 0;
 }
-
-RenderLayer* RenderLayer::enclosingCompositingLayerForRepaint(bool includeSelf) const
-{
-    if (includeSelf && isComposited() && !backing()->paintsIntoCompositedAncestor())
-        return const_cast<RenderLayer*>(this);
-
-    for (const RenderLayer* curr = compositingContainer(this); curr; curr = compositingContainer(curr)) {
-        if (curr->isComposited() && !curr->backing()->paintsIntoCompositedAncestor())
-            return const_cast<RenderLayer*>(curr);
-    }
-         
-    return 0;
-}
 #endif
 
 #if ENABLE(CSS_FILTERS)
@@ -1082,7 +1069,7 @@
         ASSERT(current);
         if (current->transform()
 #if USE(ACCELERATED_COMPOSITING)
-            || (current->isComposited() && !current->backing()->paintsIntoCompositedAncestor())
+            || (current->isComposited())
 #endif
         )
             return const_cast<RenderLayer*>(current);
@@ -2896,7 +2883,7 @@
         // but we need to ensure that we don't cache clip rects computed with the wrong root in this case.
         if (context->updatingControlTints() || (paintBehavior & PaintBehaviorFlattenCompositingLayers))
             paintFlags |= PaintLayerTemporaryClipRects;
-        else if (!backing()->paintsIntoWindow() && !backing()->paintsIntoCompositedAncestor() && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection) && !(rootLayer->containsDirtyOverlayScrollbars() && (paintFlags & PaintLayerPaintingOverlayScrollbars))) {
+        else if (!backing()->paintsIntoWindow() && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection) && !(rootLayer->containsDirtyOverlayScrollbars() && (paintFlags & PaintLayerPaintingOverlayScrollbars))) {
             // If this RenderLayer should paint into its backing, that will be done via RenderLayerBacking::paintIntoLayer().
             return;
         }

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.h (119050 => 119051)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.h	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderLayer.h	2012-05-31 04:30:56 UTC (rev 119051)
@@ -426,7 +426,6 @@
 #if USE(ACCELERATED_COMPOSITING)
     // Enclosing compositing layer; if includeSelf is true, may return this.
     RenderLayer* enclosingCompositingLayer(bool includeSelf = true) const;
-    RenderLayer* enclosingCompositingLayerForRepaint(bool includeSelf = true) const;
     // Ancestor compositing layer, excluding this.
     RenderLayer* ancestorCompositingLayer() const { return enclosingCompositingLayer(false); }
 #endif

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderLayerBacking.cpp (119050 => 119051)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-05-31 04:30:56 UTC (rev 119051)
@@ -92,7 +92,6 @@
     , m_artificiallyInflatedBounds(false)
     , m_isMainFrameRenderViewLayer(false)
     , m_usingTiledCacheLayer(false)
-    , m_requiresOwnBackingStore(true)
 #if ENABLE(CSS_FILTERS)
     , m_canCompositeFilters(false)
 #endif
@@ -566,10 +565,6 @@
     }
 
     m_graphicsLayer->setContentsRect(contentsBox());
-
-    // If this layer was created just for clipping or to apply perspective, it doesn't need its own backing store.
-    setRequiresOwnBackingStore(compositor()->requiresOwnBackingStore(m_owningLayer, compAncestor));
-
     updateDrawsContent();
     updateAfterWidgetResize();
 }
@@ -952,7 +947,7 @@
 
 bool RenderLayerBacking::containsPaintedContent() const
 {
-    if (isSimpleContainerCompositingLayer() || paintsIntoWindow() || paintsIntoCompositedAncestor() || m_artificiallyInflatedBounds || m_owningLayer->isReflection())
+    if (isSimpleContainerCompositingLayer() || paintsIntoWindow() || m_artificiallyInflatedBounds || m_owningLayer->isReflection())
         return false;
 
     if (isDirectlyCompositedImage())
@@ -1110,8 +1105,6 @@
 
 void RenderLayerBacking::setContentsNeedDisplay()
 {
-    ASSERT(!paintsIntoCompositedAncestor());
-    
     if (m_graphicsLayer && m_graphicsLayer->drawsContent())
         m_graphicsLayer->setNeedsDisplay();
     
@@ -1125,8 +1118,6 @@
 // r is in the coordinate space of the layer's render object
 void RenderLayerBacking::setContentsNeedDisplayInRect(const IntRect& r)
 {
-    ASSERT(!paintsIntoCompositedAncestor());
-
     if (m_graphicsLayer && m_graphicsLayer->drawsContent()) {
         IntRect layerDirtyRect = r;
         layerDirtyRect.move(-m_graphicsLayer->offsetFromRenderer());
@@ -1151,7 +1142,7 @@
                     PaintBehavior paintBehavior, GraphicsLayerPaintingPhase paintingPhase,
                     RenderObject* paintingRoot)
 {
-    if (paintsIntoWindow() || paintsIntoCompositedAncestor()) {
+    if (paintsIntoWindow()) {
         ASSERT_NOT_REACHED();
         return;
     }

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderLayerBacking.h (119050 => 119051)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderLayerBacking.h	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderLayerBacking.h	2012-05-31 04:30:56 UTC (rev 119051)
@@ -96,13 +96,7 @@
     // This returns false for other layers, and when the document layer actually needs to paint into its backing store
     // for some reason.
     bool paintsIntoWindow() const;
-    
-    // Returns true for a composited layer that has no backing store of its own, so
-    // paints into some ancestor layer.
-    bool paintsIntoCompositedAncestor() const { return !m_requiresOwnBackingStore; }
 
-    void setRequiresOwnBackingStore(bool flag) { m_requiresOwnBackingStore = flag; }
-
     void setContentsNeedDisplay();
     // r is in the coordinate space of the layer's render object
     void setContentsNeedDisplayInRect(const IntRect&);
@@ -242,7 +236,6 @@
     bool m_artificiallyInflatedBounds;      // bounds had to be made non-zero to make transform-origin work
     bool m_isMainFrameRenderViewLayer;
     bool m_usingTiledCacheLayer;
-    bool m_requiresOwnBackingStore;
 #if ENABLE(CSS_FILTERS)
     bool m_canCompositeFilters;
 #endif

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (119050 => 119051)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp	2012-05-31 04:30:56 UTC (rev 119051)
@@ -591,7 +591,7 @@
 
     setCompositingParent(child, 0);
     
-    RenderLayer* compLayer = parent->enclosingCompositingLayerForRepaint();
+    RenderLayer* compLayer = parent->enclosingCompositingLayer();
     if (compLayer) {
         ASSERT(compLayer->backing());
         LayoutRect compBounds = child->backing()->compositedBounds();
@@ -1217,7 +1217,7 @@
 void RenderLayerCompositor::recursiveRepaintLayerRect(RenderLayer* layer, const IntRect& rect)
 {
     // FIXME: This method does not work correctly with transforms.
-    if (layer->isComposited() && !layer->backing()->paintsIntoCompositedAncestor())
+    if (layer->isComposited())
         layer->setBackingNeedsRepaintInRect(rect);
 
 #if !ASSERT_DISABLED
@@ -1403,15 +1403,15 @@
     }
     // The root layer always has a compositing layer, but it may not have backing.
     return requiresCompositingForTransform(renderer)
-        || requiresCompositingForVideo(renderer)
-        || requiresCompositingForCanvas(renderer)
-        || requiresCompositingForPlugin(renderer)
-        || requiresCompositingForFrame(renderer)
-        || (canRender3DTransforms() && renderer->style()->backfaceVisibility() == BackfaceVisibilityHidden)
-        || clipsCompositingDescendants(layer)
-        || requiresCompositingForAnimation(renderer)
-        || requiresCompositingForFilters(renderer)
-        || requiresCompositingForPosition(renderer, layer);
+             || requiresCompositingForVideo(renderer)
+             || requiresCompositingForCanvas(renderer)
+             || requiresCompositingForPlugin(renderer)
+             || requiresCompositingForFrame(renderer)
+             || (canRender3DTransforms() && renderer->style()->backfaceVisibility() == BackfaceVisibilityHidden)
+             || clipsCompositingDescendants(layer)
+             || requiresCompositingForAnimation(renderer)
+             || requiresCompositingForFilters(renderer)
+             || requiresCompositingForPosition(renderer, layer);
 }
 
 bool RenderLayerCompositor::canBeComposited(const RenderLayer* layer) const
@@ -1421,32 +1421,6 @@
     return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && !layer->renderer()->inRenderFlowThread();
 }
 
-bool RenderLayerCompositor::requiresOwnBackingStore(const RenderLayer* layer, const RenderLayer* compositingAncestorLayer) const
-{
-    RenderObject* renderer = layer->renderer();
-    if (compositingAncestorLayer
-        && !(compositingAncestorLayer->backing()->graphicsLayer()->drawsContent()
-            || compositingAncestorLayer->backing()->paintsIntoWindow()
-            || compositingAncestorLayer->backing()->paintsIntoCompositedAncestor()))
-        return true;
-
-    return layer->isRootLayer()
-        || layer->transform() // note: excludes perspective and transformStyle3D.
-        || requiresCompositingForVideo(renderer)
-        || requiresCompositingForCanvas(renderer)
-        || requiresCompositingForPlugin(renderer)
-        || requiresCompositingForFrame(renderer)
-        || (canRender3DTransforms() && renderer->style()->backfaceVisibility() == BackfaceVisibilityHidden)
-        || requiresCompositingForAnimation(renderer)
-        || requiresCompositingForFilters(renderer)
-        || requiresCompositingForPosition(renderer, layer)
-        || renderer->isTransparent()
-        || renderer->hasMask()
-        || renderer->hasReflection()
-        || renderer->hasFilter()
-        || layer->mustOverlapCompositedLayers();
-}
-
 #if !LOG_DISABLED
 const char* RenderLayerCompositor::reasonForCompositing(const RenderLayer* layer)
 {

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderLayerCompositor.h (119050 => 119051)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderLayerCompositor.h	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderLayerCompositor.h	2012-05-31 04:30:56 UTC (rev 119051)
@@ -135,9 +135,6 @@
     // Repaint parts of all composited layers that intersect the given absolute rectangle.
     void repaintCompositedLayersAbsoluteRect(const IntRect&);
 
-    // Returns true if the given layer needs it own backing store.
-    bool requiresOwnBackingStore(const RenderLayer*, const RenderLayer* compositingAncestorLayer) const;
-
     RenderLayer* rootRenderLayer() const;
     GraphicsLayer* rootGraphicsLayer() const;
     GraphicsLayer* scrollLayer() const;

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderObject.cpp (119050 => 119051)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderObject.cpp	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderObject.cpp	2012-05-31 04:30:56 UTC (rev 119051)
@@ -1255,7 +1255,7 @@
 
 #if USE(ACCELERATED_COMPOSITING)
     if (v->usesCompositing()) {
-        RenderLayer* compLayer = enclosingLayer()->enclosingCompositingLayerForRepaint();
+        RenderLayer* compLayer = enclosingLayer()->enclosingCompositingLayer();
         if (compLayer)
             repaintContainer = compLayer->renderer();
     }

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderTreeAsText.cpp (119050 => 119051)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderTreeAsText.cpp	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderTreeAsText.cpp	2012-05-31 04:30:56 UTC (rev 119051)
@@ -631,7 +631,7 @@
 #if USE(ACCELERATED_COMPOSITING)
     if (behavior & RenderAsTextShowCompositedLayers) {
         if (l.isComposited())
-            ts << " (composited, bounds=" << l.backing()->compositedBounds() << ", drawsContent=" << l.backing()->graphicsLayer()->drawsContent() << ", paints into ancestor=" << l.backing()->paintsIntoCompositedAncestor() << ")";
+            ts << " (composited, bounds " << l.backing()->compositedBounds() << ")";
     }
 #else
     UNUSED_PARAM(behavior);

Modified: branches/safari-536-branch/Source/WebCore/rendering/RenderView.cpp (119050 => 119051)


--- branches/safari-536-branch/Source/WebCore/rendering/RenderView.cpp	2012-05-31 04:25:01 UTC (rev 119050)
+++ branches/safari-536-branch/Source/WebCore/rendering/RenderView.cpp	2012-05-31 04:30:56 UTC (rev 119051)
@@ -253,7 +253,7 @@
         }
 
 #if USE(ACCELERATED_COMPOSITING)
-        if (RenderLayer* compositingLayer = layer->enclosingCompositingLayerForRepaint()) {
+        if (RenderLayer* compositingLayer = layer->enclosingCompositingLayer()) {
             if (!compositingLayer->backing()->paintsIntoWindow()) {
                 frameView()->setCannotBlitToWindow();
                 break;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to