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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2345233004: Reuse cc::PictureLayers when possible for SPv2. (Closed)
Patch Set: none Created 4 years, 3 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
Index: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index 98c7ff587eb23bc5538ef96a84bd6831d0211b32..3915700f50a63f9a22786b3505e28378595bc9f5 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -53,13 +53,18 @@ static LayoutRect mapLocalRectToPaintInvalidationBacking(GeometryMapper& geometr
} else if (object == context.paintInvalidationContainer) {
result = LayoutRect(rect);
} else {
+ rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset));
+
+ // In SPv2, visual rects are in the space of their local transform node.
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
chrishtr 2016/09/20 22:40:58 In a followup I propose to simplify the code in th
Xianzhu 2016/09/20 23:13:41 Agreed.
+ return LayoutRect(rect);
+
+ bool success = false;
Xianzhu 2016/09/20 23:13:41 Nit: don't move this line.
chrishtr 2016/09/20 23:43:59 Done.
pdr. 2016/09/21 02:46:13 Nit: move this back down
GeometryPropertyTreeState currentTreeState(context.treeBuilderContext.current.transform, context.treeBuilderContext.current.clip, context.treeBuilderContext.currentEffect);
GeometryPropertyTreeState containerTreeState;
const ObjectPaintProperties* containerPaintProperties = context.paintInvalidationContainer->objectPaintProperties();
containerPaintProperties->getContentsProperties(containerTreeState);
- rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset));
- bool success = false;
result = LayoutRect(geometryMapper.mapToVisualRectInDestinationSpace(rect, currentTreeState, containerTreeState, success));
DCHECK(success);
result.moveBy(-containerPaintProperties->localBorderBoxProperties()->paintOffset);

Powered by Google App Engine
This is Rietveld 408576698