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

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

Issue 1391753005: (WIP) Invalidation during painting (for synchronized painting) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 247131c992ee286e3388696ab902b38545ceef4c..eaf87991edca2a39b254205b80f6c2e64d05753c 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -525,6 +525,8 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintFragmentByApplyingTransfo
// Now do a paint with the root layer shifted to be us.
PaintLayerPaintingInfo transformedPaintingInfo(&m_paintLayer, LayoutRect(enclosingIntRect(transform.inverse().mapRect(paintingInfo.paintDirtyRect))), paintingInfo.globalPaintFlags(),
adjustedSubPixelAccumulation);
+ if (paintingInfo.ancestorHasNonIdentityAndNonTranslateTransform || !transform.isIdentityOrTranslation())
+ transformedPaintingInfo.ancestorHasNonIdentityAndNonTranslateTransform = true;
transformedPaintingInfo.ancestorHasClipPathClipping = paintingInfo.ancestorHasClipPathClipping;
return paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags, ForceSingleFragment);
}
@@ -664,6 +666,16 @@ void PaintLayerPainter::paintFragmentWithPhase(PaintPhase phase, const PaintLaye
}
PaintInfo paintInfo(context, pixelSnappedIntRect(newCullRect), phase,
paintingInfo.globalPaintFlags(), paintFlags, paintingInfo.rootLayer->layoutObject());
+ Optional<PaintInvalidationState> paintInvalidationState;
+ if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) {
+ unsigned flags = 0;
+ if (clipState == HasClipped || paintingInfo.clipToDirtyRect)
+ flags |= PaintInvalidationState::HasClip;
+ if (paintingInfo.ancestorHasNonIdentityAndNonTranslateTransform)
+ flags |= PaintInvalidationState::HasNonIdentityAndNonTranslateTransform;
+ paintInvalidationState.emplace(*paintingInfo.rootLayer->layoutObject(), clipRect.rect(), flags);
+ paintInfo.paintInvalidationState = &*paintInvalidationState;
+ }
m_paintLayer.layoutObject()->paint(paintInfo, paintOffset);
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerPaintingInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698