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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.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/PaintInvalidationCapableScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.cpp
index 6e7506549b9a0a030e35bc4fb50a72fe05005ae9..c204c43bb647b78868f63e69646eca333684cba2 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidationCapableScrollableArea.cpp
@@ -28,7 +28,9 @@ void PaintInvalidationCapableScrollableArea::willRemoveScrollbar(Scrollbar& scro
static LayoutRect scrollControlPaintInvalidationRect(const IntRect& scrollControlRect, const LayoutBox& box, const PaintInvalidatorContext& context)
{
LayoutRect paintInvalidationRect(scrollControlRect);
- if (!paintInvalidationRect.isEmpty())
+ // No need to apply any paint offset. Scroll controls paint in a different transform space than their contained box
+ // (the scrollbarPaintOffset transform node).
+ if (!paintInvalidationRect.isEmpty() && !RuntimeEnabledFeatures::slimmingPaintV2Enabled())
context.mapLocalRectToPaintInvalidationBacking(box, paintInvalidationRect);
return paintInvalidationRect;
}

Powered by Google App Engine
This is Rietveld 408576698