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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2476813002: Move LayoutObject::m_previousPosition... into a global map in ObjectPaintInvalidator (Closed)
Patch Set: doc Created 4 years, 1 month 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 4bc424f28d5ab16209b5cc6bb02ce91bff555f63..a14833d472ec46bb10f59166a022b91d4f396abb 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -127,7 +127,6 @@ struct SameSizeAsLayoutObject : DisplayItemClient {
unsigned m_bitfields;
unsigned m_bitfields2;
LayoutRect m_previousVisualRect;
- LayoutPoint m_previousPosition;
};
static_assert(sizeof(LayoutObject) == sizeof(SameSizeAsLayoutObject),
@@ -1204,11 +1203,12 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(
paintInvalidationState.paintInvalidationContainer();
DCHECK(paintInvalidationContainer == containerForPaintInvalidation());
+ ObjectPaintInvalidator paintInvalidator(*this);
context.oldVisualRect = previousVisualRect();
- context.oldLocation = previousPositionFromPaintInvalidationBacking();
+ context.oldLocation = paintInvalidator.previousLocationInBacking();
context.newVisualRect = paintInvalidationState.computeVisualRectInBacking();
- context.newLocation =
- paintInvalidationState.computePositionFromPaintInvalidationBacking();
+ context.newLocation = paintInvalidationState.computeLocationInBacking(
+ context.newVisualRect.location());
IntSize adjustment =
scrollAdjustmentForPaintInvalidation(paintInvalidationContainer);
@@ -1218,7 +1218,7 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(
adjustVisualRectForRasterEffects(context.newVisualRect);
setPreviousVisualRect(context.newVisualRect);
- setPreviousPositionFromPaintInvalidationBacking(context.newLocation);
+ paintInvalidator.setPreviousLocationInBacking(context.newLocation);
if (!shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() &&
paintInvalidationState
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/PaintInvalidationState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698