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

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

Issue 2784963002: Optimize the pre-paint tree walk and ClipRects (Closed)
Patch Set: none 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/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index 8165be07c17c0a1bc1d635920683fca0955c750e..e32ca9f3705cfe02bfffd34581ac81b75da623f1 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -228,9 +228,8 @@ static bool shouldRepaintSubsequence(
paintLayer.clipper(PaintLayer::DoNotUseGeometryMapper)
.paintingClipRects(paintingInfo.rootLayer, respectOverflowClip,
subpixelAccumulation);
- ClipRects* previousClipRects = paintLayer.previousPaintingClipRects();
- if (&clipRects != previousClipRects &&
- (!previousClipRects || clipRects != *previousClipRects)) {
+ if (!paintLayer.hasPreviousPaintingClipRects() ||
+ clipRects != paintLayer.previousPaintingClipRects()) {
needsRepaint = true;
shouldClearEmptyPaintPhaseFlags = true;
}

Powered by Google App Engine
This is Rietveld 408576698