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

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

Issue 2761673005: Optimize scroll adjustment for paint invalidation
Patch Set: - Created 3 years, 9 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/ObjectPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
index 256b397caaf59cb537cd978413d18291e05fb323..d3960945ef8f0c985ecf88ca0e4ec765a1dd2829 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
@@ -405,8 +405,10 @@ LayoutRect ObjectPaintInvalidator::invalidatePaintRectangle(
LayoutRect dirtyRectOnBacking = dirtyRect;
PaintLayer::mapRectToPaintInvalidationBacking(
m_object, paintInvalidationContainer, dirtyRectOnBacking);
- dirtyRectOnBacking.move(m_object.scrollAdjustmentForPaintInvalidation(
- paintInvalidationContainer));
+ if (m_object != paintInvalidationContainer) {
+ dirtyRectOnBacking.move(
+ paintInvalidationContainer.scrollAdjustmentForPaintInvalidation());
+ }
invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRectOnBacking,
PaintInvalidationRectangle);

Powered by Google App Engine
This is Rietveld 408576698