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

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

Issue 380583003: Revert of Revert of Divorce PaintInvalidationState from LayoutState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderListBox.h » ('j') | 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 c7a7d8b95737539a8e8c33f36109a3dca790f3cc..cceb8831eb6bf4003ca9a6e2a7401d66ab4a8350 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -552,29 +552,22 @@
}
}
-LayoutPoint RenderLayer::positionFromPaintInvalidationContainer(const RenderObject* renderObject, const RenderLayerModelObject* paintInvalidationContainer)
+LayoutPoint RenderLayer::positionFromPaintInvalidationContainer(const RenderObject* renderObject, const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState)
{
if (!paintInvalidationContainer || !paintInvalidationContainer->layer()->groupedMapping())
- return renderObject->positionFromPaintInvalidationContainer(paintInvalidationContainer);
+ return renderObject->positionFromPaintInvalidationContainer(paintInvalidationContainer, paintInvalidationState);
RenderLayerModelObject* transformedAncestor = paintInvalidationContainer->layer()->enclosingTransformedAncestor()->renderer();
if (!transformedAncestor)
- return renderObject->positionFromPaintInvalidationContainer(paintInvalidationContainer);
-
- // If the transformedAncestor is actually the RenderView, we might get
- // confused and think that we can use LayoutState. Ideally, we'd made
- // LayoutState work for all composited layers as well, but until then
- // we need to disable LayoutState for squashed layers.
- ForceHorriblySlowRectMapping slowRectMapping(*transformedAncestor);
-
- LayoutPoint point = renderObject->positionFromPaintInvalidationContainer(transformedAncestor);
+ return renderObject->positionFromPaintInvalidationContainer(paintInvalidationContainer, paintInvalidationState);
+
+ LayoutPoint point = renderObject->positionFromPaintInvalidationContainer(transformedAncestor, paintInvalidationState);
point.moveBy(-paintInvalidationContainer->layer()->groupedMapping()->squashingOffsetFromTransformedAncestor());
return point;
}
void RenderLayer::mapRectToPaintBackingCoordinates(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect)
{
-
RenderLayer* paintInvalidationLayer = paintInvalidationContainer->layer();
if (!paintInvalidationLayer->groupedMapping()) {
rect.move(paintInvalidationLayer->compositedLayerMapping()->contentOffsetInCompositingLayer());
@@ -585,12 +578,6 @@
if (!transformedAncestor)
return;
- // If the transformedAncestor is actually the RenderView, we might get
- // confused and think that we can use LayoutState. Ideally, we'd made
- // LayoutState work for all composited layers as well, but until then
- // we need to disable LayoutState for squashed layers.
- ForceHorriblySlowRectMapping slowRectMapping(*transformedAncestor);
-
// |repaintContainer| may have a local 2D transform on it, so take that into account when mapping into the space of the
// transformed ancestor.
rect = LayoutRect(paintInvalidationContainer->localToContainerQuad(FloatRect(rect), transformedAncestor).boundingBox());
@@ -598,10 +585,10 @@
rect.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromTransformedAncestor());
}
-void RenderLayer::mapRectToPaintInvalidationBacking(const RenderObject* renderObject, const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect)
+void RenderLayer::mapRectToPaintInvalidationBacking(const RenderObject* renderObject, const RenderLayerModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState)
{
if (!paintInvalidationContainer->layer()->groupedMapping()) {
- renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect);
+ renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, paintInvalidationState);
return;
}
@@ -609,17 +596,17 @@
// layer. This is because all layers that squash together need to repaint w.r.t. a single container that is
// an ancestor of all of them, in order to properly take into account any local transforms etc.
// FIXME: remove this special-case code that works around the repainting code structure.
- renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect);
+ renderObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, paintInvalidationState);
RenderLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer, rect);
}
-LayoutRect RenderLayer::computePaintInvalidationRect(const RenderObject* renderObject, const RenderLayer* paintInvalidationContainer)
+LayoutRect RenderLayer::computePaintInvalidationRect(const RenderObject* renderObject, const RenderLayer* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState)
{
if (!paintInvalidationContainer->groupedMapping())
return renderObject->computePaintInvalidationRect(paintInvalidationContainer->renderer());
LayoutRect rect = renderObject->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer->renderer());
- mapRectToPaintInvalidationBacking(paintInvalidationContainer->renderer(), paintInvalidationContainer->renderer(), rect);
+ mapRectToPaintInvalidationBacking(paintInvalidationContainer->renderer(), paintInvalidationContainer->renderer(), rect, paintInvalidationState);
return rect;
}
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderListBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698