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

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

Issue 2238883006: SPv2: Use GeometryMapper to implement PaintLayerClipper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 4 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 86176fa7819076bb8bebf5db97cc9b96570ad85a..6e5c18b8e4ecaa8a0de904a10e5ea07a235ce7d1 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -235,11 +235,13 @@ static bool shouldRepaintSubsequence(PaintLayer& paintLayer, const PaintLayerPai
needsRepaint = true;
// Repaint if layer's clip changes.
- ClipRects& clipRects = paintLayer.clipper().paintingClipRects(paintingInfo.rootLayer, respectOverflowClip, subpixelAccumulation);
- ClipRects* previousClipRects = paintLayer.previousPaintingClipRects();
- if (!needsRepaint && &clipRects != previousClipRects && (!previousClipRects || clipRects != *previousClipRects))
- needsRepaint = true;
- paintLayer.setPreviousPaintingClipRects(clipRects);
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ ClipRects& clipRects = paintLayer.clipper().paintingClipRects(paintingInfo.rootLayer, respectOverflowClip, subpixelAccumulation);
+ ClipRects* previousClipRects = paintLayer.previousPaintingClipRects();
+ if (!needsRepaint && &clipRects != previousClipRects && (!previousClipRects || clipRects != *previousClipRects))
+ needsRepaint = true;
+ paintLayer.setPreviousPaintingClipRects(clipRects);
+ }
// Repaint if previously the layer might be clipped by paintDirtyRect and paintDirtyRect changes.
if (!needsRepaint && paintLayer.previousPaintResult() == PaintLayerPainter::MayBeClippedByPaintDirtyRect && paintLayer.previousPaintDirtyRect() != paintingInfo.paintDirtyRect)
@@ -345,15 +347,6 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
else
m_paintLayer.collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaintingInfo.paintDirtyRect, cacheSlot, IgnoreOverlayScrollbarSize, respectOverflowClip, &offsetFromRoot, localPaintingInfo.subPixelAccumulation);
- // TODO(trchen): Needs to adjust cull rect between transform spaces. https://crbug.com/593596
- // Disables layer culling for SPv2 for now because the space of the cull rect doesn't match
- // the space we paint in. Clipping will still be done by clip nodes, so this won't cause
- // rendering issues, only performance.
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- layerFragments[0].backgroundRect = LayoutRect(LayoutRect::infiniteIntRect());
- layerFragments[0].foregroundRect = LayoutRect(LayoutRect::infiniteIntRect());
- }
-
if (shouldPaintContent) {
// TODO(wangxianzhu): This is for old slow scrolling. Implement similar optimization for slimming paint v2.
shouldPaintContent = atLeastOneFragmentIntersectsDamageRect(layerFragments, localPaintingInfo, paintFlags, offsetFromRoot);

Powered by Google App Engine
This is Rietveld 408576698