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

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

Issue 1584903002: Improvement handling of background and outline paint phases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PaintPhaseRename
Patch Set: Fix TablePainter and TableRowPainter 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 2af6461719d5e56ad1472e908ffeaf6f329f0428..7ff3eef3fabf9fcbf135b808dc4f78bcae459381 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -614,8 +614,8 @@ void PaintLayerPainter::paintFragmentWithPhase(PaintPhase phase, const PaintLaye
DisplayItem::Type clipType = DisplayItem::paintPhaseToClipLayerFragmentType(phase);
LayerClipRecorder::BorderRadiusClippingRule clippingRule;
switch (phase) {
- case PaintPhaseSelfBlockBackground: // Background painting will handle clipping to self.
- case PaintPhaseSelfOutline:
+ case PaintPhaseSelfBlockBackgroundOnly: // Background painting will handle clipping to self.
+ case PaintPhaseSelfOutlineOnly:
case PaintPhaseMask: // Mask painting will handle clipping to self.
clippingRule = LayerClipRecorder::DoNotIncludeSelfForBorderRadius;
break;
@@ -655,7 +655,7 @@ void PaintLayerPainter::paintBackgroundForFragments(const PaintLayerFragments& l
Optional<ScopeRecorder> scopeRecorder;
if (needsScope)
scopeRecorder.emplace(context);
- paintFragmentWithPhase(PaintPhaseSelfBlockBackground, fragment, context, fragment.backgroundRect, localPaintingInfo, paintingRootForLayoutObject, paintFlags, HasNotClipped);
+ paintFragmentWithPhase(PaintPhaseSelfBlockBackgroundOnly, fragment, context, fragment.backgroundRect, localPaintingInfo, paintingRootForLayoutObject, paintFlags, HasNotClipped);
}
}
@@ -674,13 +674,13 @@ 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 : PaintPhaseDescendantBlockBackgrounds, layerFragments,
+ paintForegroundForFragmentsWithPhase(selectionOnly ? PaintPhaseSelection : PaintPhaseDescendantBlockBackgroundsOnly, layerFragments,
context, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState);
if (!selectionOnly) {
paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, context, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState);
paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragments, context, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState);
- paintForegroundForFragmentsWithPhase(PaintPhaseDescendantOutlines, layerFragments, context, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState);
+ paintForegroundForFragmentsWithPhase(PaintPhaseDescendantOutlinesOnly, layerFragments, context, localPaintingInfo, paintingRootForLayoutObject, paintFlags, clipState);
}
}
@@ -707,7 +707,7 @@ void PaintLayerPainter::paintOutlineForFragments(const PaintLayerFragments& laye
Optional<ScopeRecorder> scopeRecorder;
if (needsScope)
scopeRecorder.emplace(context);
- paintFragmentWithPhase(PaintPhaseSelfOutline, fragment, context, fragment.backgroundRect, localPaintingInfo, paintingRootForLayoutObject, paintFlags, HasNotClipped);
+ paintFragmentWithPhase(PaintPhaseSelfOutlineOnly, fragment, context, fragment.backgroundRect, localPaintingInfo, paintingRootForLayoutObject, paintFlags, HasNotClipped);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698