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

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

Issue 1626623002: Skip PaintPhaseDescendantBlockBackgroundsOnly phase if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FloatPhase
Patch Set: Created 4 years, 11 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 89a4faa8c10b8fa062f19ed8359b329f1e7e1c7d..84b8d17f8c95530eb96a21adf94511862f8e8103 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -667,10 +667,11 @@ void PaintLayerPainter::paintForegroundForFragments(const PaintLayerFragments& l
// We have to loop through every fragment multiple times, since we have to issue paint invalidations in each specific phase in order for
// interleaving of the fragments to work properly.
- paintForegroundForFragmentsWithPhase(selectionOnly ? PaintPhaseSelection : PaintPhaseDescendantBlockBackgroundsOnly,
- layerFragments, context, localPaintingInfo, paintFlags, clipState);
-
- if (!selectionOnly) {
+ if (selectionOnly) {
+ paintForegroundForFragmentsWithPhase(PaintPhaseSelection, layerFragments, context, localPaintingInfo, paintFlags, clipState);
+ } else {
+ if (m_paintLayer.needsPaintPhaseDescendantBlockBackgrounds())
+ paintForegroundForFragmentsWithPhase(PaintPhaseDescendantBlockBackgroundsOnly, layerFragments, context, localPaintingInfo, paintFlags, clipState);
if (m_paintLayer.needsPaintPhaseFloat())
paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, context, localPaintingInfo, paintFlags, clipState);
paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragments, context, localPaintingInfo, paintFlags, clipState);
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698