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

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

Issue 1809593002: [SPv2] Disables paint layer culling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +mac test expectation Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b044498773b5af7e75d8e58d8cce6ec370aa85b8..07cca468c0b3341492c943ed92bb3645261bb827 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -337,6 +337,16 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
m_paintLayer.appendSingleFragmentIgnoringPagination(layerFragments, localPaintingInfo.rootLayer, localPaintingInfo.paintDirtyRect, cacheSlot, IgnoreOverlayScrollbarSize, respectOverflowClip, &offsetFromRoot, localPaintingInfo.subPixelAccumulation);
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);
@@ -414,6 +424,10 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
bool PaintLayerPainter::needsToClip(const PaintLayerPaintingInfo& localPaintingInfo, const ClipRect& clipRect)
{
+ // Clipping will be applied by property nodes directly for SPv2.
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ return false;
+
return clipRect.rect() != localPaintingInfo.paintDirtyRect || clipRect.hasRadius();
}
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698