Chromium Code Reviews| Index: Source/core/layout/svg/LayoutSVGResourceMasker.cpp |
| diff --git a/Source/core/layout/svg/LayoutSVGResourceMasker.cpp b/Source/core/layout/svg/LayoutSVGResourceMasker.cpp |
| index 06e5cbdc7097f987eba4f92b89990beb53e50370..6077aa7a2d01e064e377aedb71b149d24bec42ce 100644 |
| --- a/Source/core/layout/svg/LayoutSVGResourceMasker.cpp |
| +++ b/Source/core/layout/svg/LayoutSVGResourceMasker.cpp |
| @@ -25,6 +25,7 @@ |
| #include "core/paint/SVGPaintContext.h" |
| #include "core/svg/SVGElement.h" |
| #include "platform/graphics/paint/DisplayItemList.h" |
| +#include "platform/graphics/paint/SkPictureBuilder.h" |
| #include "platform/transforms/AffineTransform.h" |
| #include "third_party/skia/include/core/SkPicture.h" |
| @@ -70,15 +71,11 @@ 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(displayItemList.get()); |
| - context.beginRecording(bounds); |
| + SkPictureBuilder pictureBuilder(bounds); |
| ColorFilter maskContentFilter = style()->svgStyle().colorInterpolation() == CI_LINEARRGB |
| ? ColorFilterSRGBToLinearRGB : ColorFilterNone; |
| - context.setColorFilter(maskContentFilter); |
| + pictureBuilder.context().setColorFilter(maskContentFilter); |
| for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement)) { |
| LayoutObject* layoutObject = childElement->layoutObject(); |
| @@ -88,12 +85,10 @@ PassRefPtr<const SkPicture> LayoutSVGResourceMasker::createContentPicture(Affine |
| if (!style || style->display() == NONE || style->visibility() != VISIBLE) |
| continue; |
| - SVGPaintContext::paintSubtree(&context, layoutObject); |
| + SVGPaintContext::paintSubtree(&pictureBuilder.context(), layoutObject); |
| } |
| - if (displayItemList) |
| - displayItemList->commitNewDisplayItemsAndReplay(context); |
| - m_maskContentPicture = context.endRecording(); |
| + m_maskContentPicture = pictureBuilder.context().endRecording(); |
|
pdr.
2015/04/17 04:30:34
This should be pictureBuilder.endRecording().
|
| return m_maskContentPicture; |
| } |