Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: Source/core/rendering/RenderLayer.cpp

Issue 666493002: Remove updatePaintingInfoForFragments() and per-fragment shouldPaintContent flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase master Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/core/paint/LayerPainter.cpp ('K') | « Source/core/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index ba9c9160db2976b1d391d06894bc2f66cab7d88d..0dc7d9056e22e0fe860d3f75a7812b87ae2b8bee 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -1468,9 +1468,7 @@ bool RenderLayer::hasOverflowControls() const
return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollableArea->hasScrollCorner() || renderer()->style()->resize() != RESIZE_NONE);
}
-void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer* rootLayer, const LayoutRect& dirtyRect,
- ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelevancy, ShouldRespectOverflowClip respectOverflowClip, const LayoutPoint* offsetFromRoot,
- const LayoutSize& subPixelAccumulation, const LayoutRect* layerBoundingBox)
+void RenderLayer::collectFragments(LayerFragments& fragments, DirtyRectIntersectionResult* intersectionResult, const RenderLayer* rootLayer, const LayoutRect& dirtyRect, ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelevancy, ShouldRespectOverflowClip respectOverflowClip, const LayoutPoint* offsetFromRoot, const LayoutSize& subPixelAccumulation, const LayoutRect* layerBoundingBox)
{
if (!enclosingPaginationLayer() || hasTransformRelatedProperty()) {
// For unpaginated layers, there is only one fragment.
@@ -1480,6 +1478,8 @@ void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer*
clipRectsContext.setIgnoreOverflowClip();
clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBounds, fragment.backgroundRect, fragment.foregroundRect, fragment.outlineRect, offsetFromRoot);
fragments.append(fragment);
+ if (intersectionResult)
+ *intersectionResult = intersectsDamageRect(fragment.layerBounds, fragment.backgroundRect.rect(), rootLayer, offsetFromRoot) ? IntersectingDirtyRect : NotIntersectingDirtyRect;
return;
}
@@ -1523,8 +1523,11 @@ void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer*
// that intersect the actual dirtyRect as well as the pages/columns that intersect our layer's bounding box.
enclosingFlowThread->collectLayerFragments(fragments, layerBoundingBoxInFlowThread, dirtyRectInFlowThread);
- if (fragments.isEmpty())
+ if (fragments.isEmpty()) {
chrishtr 2014/10/28 18:47:42 When would there ever be 0 fragments? Will this pa
chrishtr 2014/10/28 18:47:42 When would there ever be 0 fragments?
mstensho (USE GERRIT) 2014/10/28 20:08:21 Yes, only reachable by columns. There'll be no fra
+ if (intersectionResult)
+ *intersectionResult = NotIntersectingDirtyRect;
return;
+ }
// Get the parent clip rects of the pagination layer, since we need to intersect with that when painting column contents.
ClipRect ancestorClipRect = dirtyRect;
@@ -1553,6 +1556,8 @@ void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer*
// clip, so the column clip ends up being all we apply.
fragment.intersect(fragment.paginationClip);
}
+ if (intersectionResult)
+ *intersectionResult = IntersectingDirtyRect;
}
static inline LayoutRect frameVisibleRect(RenderObject* renderer)
@@ -1798,7 +1803,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont
// Collect the fragments. This will compute the clip rectangles for each layer fragment.
LayerFragments layerFragments;
- collectFragments(layerFragments, rootLayer, hitTestRect, RootRelativeClipRects, IncludeOverlayScrollbarSize);
+ collectFragments(layerFragments, 0, rootLayer, hitTestRect, RootRelativeClipRects, IncludeOverlayScrollbarSize);
if (m_scrollableArea && m_scrollableArea->hitTestResizerInFragments(layerFragments, hitTestLocation)) {
renderer()->updateHitTestResult(result, hitTestLocation.point());
@@ -1882,7 +1887,7 @@ RenderLayer* RenderLayer::hitTestTransformedLayerInFragments(RenderLayer* rootLa
LayoutPoint offsetOfPaginationLayerFromRoot;
// FIXME: We're missing a sub-pixel offset here crbug.com/348728
LayoutRect transformedExtent = transparencyClipBox(this, enclosingPaginationLayer(), HitTestingTransparencyClipBox, RenderLayer::RootOfTransparencyClipBox, LayoutSize());
- enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, rootLayer, hitTestRect,
+ enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, 0, rootLayer, hitTestRect,
RootRelativeClipRects, IncludeOverlayScrollbarSize, RespectOverflowClip, &offsetOfPaginationLayerFromRoot, LayoutSize(), &transformedExtent);
for (int i = enclosingPaginationFragments.size() - 1; i >= 0; --i) {
« Source/core/paint/LayerPainter.cpp ('K') | « Source/core/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698