Chromium Code Reviews| Index: Source/core/paint/LayerPainter.cpp | 
| diff --git a/Source/core/paint/LayerPainter.cpp b/Source/core/paint/LayerPainter.cpp | 
| index d00ce6861dcc3d923586b85163ba3eb9cb1e601f..6eb396272e1024314161610af65c7565bc8363b2 100644 | 
| --- a/Source/core/paint/LayerPainter.cpp | 
| +++ b/Source/core/paint/LayerPainter.cpp | 
| @@ -262,7 +262,6 @@ void LayerPainter::paintLayerContents(GraphicsContext* context, const LayerPaint | 
| m_renderLayer.collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaintingInfo.paintDirtyRect, | 
| (paintFlags & PaintLayerUncachedClipRects) ? UncachedClipRects : PaintingClipRects, IgnoreOverlayScrollbarSize, | 
| shouldRespectOverflowClip(paintFlags, m_renderLayer.renderer()), &offsetFromRoot, localPaintingInfo.subPixelAccumulation); | 
| - updatePaintingInfoForFragments(layerFragments, localPaintingInfo, paintFlags, shouldPaintContent, &offsetFromRoot); | 
| } | 
| if (haveFilterEffect) { | 
| @@ -420,20 +419,6 @@ void LayerPainter::restoreClip(GraphicsContext* context, const LayoutRect& paint | 
| context->restore(); | 
| } | 
| -void LayerPainter::updatePaintingInfoForFragments(LayerFragments& fragments, const LayerPaintingInfo& localPaintingInfo, PaintLayerFlags localPaintFlags, | 
| - bool shouldPaintContent, const LayoutPoint* offsetFromRoot) | 
| -{ | 
| - ASSERT(offsetFromRoot); | 
| - for (size_t i = 0; i < fragments.size(); ++i) { | 
| - LayerFragment& fragment = fragments.at(i); | 
| - fragment.shouldPaintContent = shouldPaintContent; | 
| - if (&m_renderLayer != localPaintingInfo.rootLayer || !(localPaintFlags & PaintLayerPaintingOverflowContents)) { | 
| - LayoutPoint newOffsetFromRoot = *offsetFromRoot + fragment.paginationOffset; | 
| - fragment.shouldPaintContent &= m_renderLayer.intersectsDamageRect(fragment.layerBounds, fragment.backgroundRect.rect(), localPaintingInfo.rootLayer, &newOffsetFromRoot); | 
| 
 
chrishtr
2014/10/17 19:05:59
For the case of only one fragment (i.e. non-column
 
mstensho (USE GERRIT)
2014/10/17 20:06:50
Oops, I was a bit quick there. I got confused by t
 
mstensho (USE GERRIT)
2014/10/20 08:16:02
Done. I had a hard time doing something pretty her
 
 | 
| - } | 
| - } | 
| -} | 
| - | 
| void LayerPainter::paintLayerByApplyingTransform(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags, const LayoutPoint& translationOffset) | 
| { | 
| // This involves subtracting out the position of the layer in our current coordinate space, but preserving | 
| @@ -666,8 +651,6 @@ void LayerPainter::paintBackgroundForFragments(const LayerFragments& layerFragme | 
| { | 
| for (size_t i = 0; i < layerFragments.size(); ++i) { | 
| const LayerFragment& fragment = layerFragments.at(i); | 
| - if (!fragment.shouldPaintContent) | 
| - continue; | 
| // Begin transparency layers lazily now that we know we have to paint something. | 
| if (haveTransparency || m_renderLayer.paintsWithBlendMode()) | 
| @@ -697,7 +680,7 @@ void LayerPainter::paintForegroundForFragments(const LayerFragments& layerFragme | 
| if (haveTransparency || m_renderLayer.paintsWithBlendMode()) { | 
| for (size_t i = 0; i < layerFragments.size(); ++i) { | 
| const LayerFragment& fragment = layerFragments.at(i); | 
| - if (fragment.shouldPaintContent && !fragment.foregroundRect.isEmpty()) { | 
| + if (!fragment.foregroundRect.isEmpty()) { | 
| beginTransparencyLayers(context, localPaintingInfo.rootLayer, transparencyPaintDirtyRect, localPaintingInfo.subPixelAccumulation, localPaintingInfo.paintBehavior); | 
| break; | 
| } | 
| @@ -705,7 +688,7 @@ void LayerPainter::paintForegroundForFragments(const LayerFragments& layerFragme | 
| } | 
| // Optimize clipping for the single fragment case. | 
| - bool shouldClip = localPaintingInfo.clipToDirtyRect && layerFragments.size() == 1 && layerFragments[0].shouldPaintContent && !layerFragments[0].foregroundRect.isEmpty(); | 
| + bool shouldClip = localPaintingInfo.clipToDirtyRect && layerFragments.size() == 1 && !layerFragments[0].foregroundRect.isEmpty(); | 
| if (shouldClip) | 
| clipToRect(localPaintingInfo, context, layerFragments[0].foregroundRect, paintFlags); | 
| @@ -731,7 +714,7 @@ void LayerPainter::paintForegroundForFragmentsWithPhase(PaintPhase phase, const | 
| for (size_t i = 0; i < layerFragments.size(); ++i) { | 
| const LayerFragment& fragment = layerFragments.at(i); | 
| - if (!fragment.shouldPaintContent || fragment.foregroundRect.isEmpty()) | 
| + if (fragment.foregroundRect.isEmpty()) | 
| continue; | 
| if (shouldClip) | 
| @@ -766,9 +749,6 @@ void LayerPainter::paintMaskForFragments(const LayerFragments& layerFragments, G | 
| { | 
| for (size_t i = 0; i < layerFragments.size(); ++i) { | 
| const LayerFragment& fragment = layerFragments.at(i); | 
| - if (!fragment.shouldPaintContent) | 
| - continue; | 
| - | 
| if (localPaintingInfo.clipToDirtyRect) | 
| clipToRect(localPaintingInfo, context, fragment.backgroundRect, paintFlags, DoNotIncludeSelfForBorderRadius); // Mask painting will handle clipping to self. | 
| @@ -787,9 +767,6 @@ void LayerPainter::paintChildClippingMaskForFragments(const LayerFragments& laye | 
| { | 
| for (size_t i = 0; i < layerFragments.size(); ++i) { | 
| const LayerFragment& fragment = layerFragments.at(i); | 
| - if (!fragment.shouldPaintContent) | 
| - continue; | 
| - | 
| if (localPaintingInfo.clipToDirtyRect) | 
| clipToRect(localPaintingInfo, context, fragment.foregroundRect, paintFlags, IncludeSelfForBorderRadius); // Child clipping mask painting will handle clipping to self. |