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

Unified Diff: Source/core/layout/svg/LayoutSVGResourceMasker.cpp

Issue 1048223002: Add DisplayItemListPictureRecorder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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: Source/core/layout/svg/LayoutSVGResourceMasker.cpp
diff --git a/Source/core/layout/svg/LayoutSVGResourceMasker.cpp b/Source/core/layout/svg/LayoutSVGResourceMasker.cpp
index 90a30b24d69c20e1022a8a323c06742ecf7a2545..18b5f49910bd471f1ca362a633938f8fd57b706c 100644
--- a/Source/core/layout/svg/LayoutSVGResourceMasker.cpp
+++ b/Source/core/layout/svg/LayoutSVGResourceMasker.cpp
@@ -24,7 +24,7 @@
#include "core/layout/svg/SVGLayoutSupport.h"
#include "core/paint/SVGPaintContext.h"
#include "core/svg/SVGElement.h"
-#include "platform/graphics/paint/DisplayItemList.h"
+#include "platform/graphics/paint/DisplayItemListPictureRecorder.h"
#include "platform/transforms/AffineTransform.h"
#include "third_party/skia/include/core/SkPicture.h"
@@ -70,11 +70,8 @@ PassRefPtr<const SkPicture> LayoutSVGResourceMasker::createContentPicture(Affine
// userSpaceOnUse units (http://crbug.com/294900).
FloatRect bounds = strokeBoundingBox();
- OwnPtr<DisplayItemList> displayItemList;
- if (RuntimeEnabledFeatures::slimmingPaintEnabled())
- displayItemList = DisplayItemList::create();
- GraphicsContext context(nullptr, displayItemList.get());
- context.beginRecording(bounds);
+ DisplayItemListPictureRecorder pictureRecorder(bounds);
+ GraphicsContext& context = pictureRecorder.context();
ColorFilter maskContentFilter = style()->svgStyle().colorInterpolation() == CI_LINEARRGB
? ColorFilterSRGBToLinearRGB : ColorFilterNone;
@@ -91,9 +88,7 @@ PassRefPtr<const SkPicture> LayoutSVGResourceMasker::createContentPicture(Affine
SVGPaintContext::paintSubtree(&context, layoutObject);
}
- if (displayItemList)
- displayItemList->replay(&context);
- m_maskContentPicture = context.endRecording();
+ m_maskContentPicture = pictureRecorder.endRecording();
return m_maskContentPicture;
}

Powered by Google App Engine
This is Rietveld 408576698