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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp

Issue 2792833002: Revert of Optimize the pre-paint tree walk and ClipRects (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintLayerPainter.h" 5 #include "core/paint/PaintLayerPainter.h"
6 6
7 #include "core/frame/LocalFrame.h" 7 #include "core/frame/LocalFrame.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/paint/ClipPathClipper.h" 9 #include "core/paint/ClipPathClipper.h"
10 #include "core/paint/FilterPainter.h" 10 #include "core/paint/FilterPainter.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // won't cause the paint phases to become non-empty. 221 // won't cause the paint phases to become non-empty.
222 if (paintLayer.needsRepaint()) 222 if (paintLayer.needsRepaint())
223 needsRepaint = true; 223 needsRepaint = true;
224 224
225 // Repaint if layer's clip changes. 225 // Repaint if layer's clip changes.
226 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { 226 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
227 ClipRects& clipRects = 227 ClipRects& clipRects =
228 paintLayer.clipper(PaintLayer::DoNotUseGeometryMapper) 228 paintLayer.clipper(PaintLayer::DoNotUseGeometryMapper)
229 .paintingClipRects(paintingInfo.rootLayer, respectOverflowClip, 229 .paintingClipRects(paintingInfo.rootLayer, respectOverflowClip,
230 subpixelAccumulation); 230 subpixelAccumulation);
231 if (!paintLayer.hasPreviousPaintingClipRects() || 231 ClipRects* previousClipRects = paintLayer.previousPaintingClipRects();
232 clipRects != paintLayer.previousPaintingClipRects()) { 232 if (&clipRects != previousClipRects &&
233 (!previousClipRects || clipRects != *previousClipRects)) {
233 needsRepaint = true; 234 needsRepaint = true;
234 shouldClearEmptyPaintPhaseFlags = true; 235 shouldClearEmptyPaintPhaseFlags = true;
235 } 236 }
236 paintLayer.setPreviousPaintingClipRects(clipRects); 237 paintLayer.setPreviousPaintingClipRects(clipRects);
237 } 238 }
238 239
239 // Repaint if previously the layer might be clipped by paintDirtyRect and 240 // Repaint if previously the layer might be clipped by paintDirtyRect and
240 // paintDirtyRect changes. 241 // paintDirtyRect changes.
241 if (paintLayer.previousPaintResult() == MayBeClippedByPaintDirtyRect && 242 if (paintLayer.previousPaintResult() == MayBeClippedByPaintDirtyRect &&
242 paintLayer.previousPaintDirtyRect() != paintingInfo.paintDirtyRect) { 243 paintLayer.previousPaintDirtyRect() != paintingInfo.paintDirtyRect) {
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 context, layoutObject, PaintPhaseClippingMask)) 1202 context, layoutObject, PaintPhaseClippingMask))
1202 return; 1203 return;
1203 1204
1204 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect()); 1205 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect());
1205 LayoutObjectDrawingRecorder drawingRecorder( 1206 LayoutObjectDrawingRecorder drawingRecorder(
1206 context, layoutObject, PaintPhaseClippingMask, snappedClipRect); 1207 context, layoutObject, PaintPhaseClippingMask, snappedClipRect);
1207 context.fillRect(snappedClipRect, Color::black); 1208 context.fillRect(snappedClipRect, Color::black);
1208 } 1209 }
1209 1210
1210 } // namespace blink 1211 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698