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

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

Issue 2581243002: Simplify and speed up painting of clipping masks (Closed)
Patch Set: Fix cases with no clip recorder Created 4 years 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/LayerClipRecorder.cpp
diff --git a/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
index bd8878a302b1dba1b02acd1c370850ad6cce395d..6c69213ab16795373cd266a1f580b43d11e65b4c 100644
--- a/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
+++ b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
@@ -27,16 +27,14 @@ LayerClipRecorder::LayerClipRecorder(
: m_graphicsContext(graphicsContext),
m_layoutObject(layoutObject),
m_clipType(clipType) {
- IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect());
- Vector<FloatRoundedRect> roundedRects;
+ m_snappedClipRect = pixelSnappedIntRect(clipRect.rect());
if (localPaintingInfo && clipRect.hasRadius()) {
collectRoundedRectClips(*layoutObject.layer(), *localPaintingInfo,
- graphicsContext, fragmentOffset, paintFlags, rule,
- roundedRects);
+ graphicsContext, fragmentOffset, paintFlags, rule);
}
m_graphicsContext.getPaintController().createAndAppend<ClipDisplayItem>(
- layoutObject, m_clipType, snappedClipRect, roundedRects);
+ layoutObject, m_clipType, m_snappedClipRect, m_roundedRects);
}
static bool inContainingBlockChain(PaintLayer* startLayer,
@@ -62,8 +60,7 @@ void LayerClipRecorder::collectRoundedRectClips(
GraphicsContext& context,
const LayoutPoint& fragmentOffset,
PaintLayerFlags paintFlags,
- BorderRadiusClippingRule rule,
- Vector<FloatRoundedRect>& roundedRectClips) {
+ BorderRadiusClippingRule rule) {
// If the clip rect has been tainted by a border radius, then we have to walk
// up our layer chain applying the clips from any layers with overflow. The
// condition for being able to apply these clips is that the overflow object
@@ -94,7 +91,7 @@ void LayerClipRecorder::collectRoundedRectClips(
LayoutSize size(layer->layoutBox()
? toLayoutBox(layer->layoutObject())->size()
: LayoutSize(layer->size()));
- roundedRectClips.append(
+ m_roundedRects.append(
layer->layoutObject()->style()->getRoundedInnerBorderFor(
LayoutRect(delta, size)));
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/LayerClipRecorder.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698