Chromium Code Reviews| Index: Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
| diff --git a/Source/core/layout/svg/LayoutSVGResourceClipper.cpp b/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
| index abf1092c4b74cfc7473056648694d3e6efe4ffd7..5c5d07e700bf12c14120109533eaef2c0ab6415b 100644 |
| --- a/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
| +++ b/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
| @@ -36,7 +36,7 @@ |
| #include "platform/RuntimeEnabledFeatures.h" |
| #include "platform/graphics/paint/ClipPathDisplayItem.h" |
| #include "platform/graphics/paint/CompositingDisplayItem.h" |
| -#include "platform/graphics/paint/DisplayItemList.h" |
| +#include "platform/graphics/paint/DisplayItemListPictureRecorder.h" |
| #include "platform/graphics/paint/DrawingDisplayItem.h" |
| #include "third_party/skia/include/core/SkPicture.h" |
| @@ -154,11 +154,8 @@ PassRefPtr<const SkPicture> LayoutSVGResourceClipper::createContentPicture(Affin |
| // 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); |
|
chrishtr
2015/03/31 21:52:51
This is getting a little out of hand with lots of
|
| + GraphicsContext& context = pictureRecorder.context(); |
| for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element()); childElement; childElement = Traversal<SVGElement>::nextSibling(*childElement)) { |
| LayoutObject* layoutObject = childElement->layoutObject(); |
| @@ -198,9 +195,7 @@ PassRefPtr<const SkPicture> LayoutSVGResourceClipper::createContentPicture(Affin |
| layoutObject->paint(info, IntPoint()); |
| } |
| - if (displayItemList) |
| - displayItemList->replay(&context); |
| - m_clipContentPicture = context.endRecording(); |
| + m_clipContentPicture = pictureRecorder.endRecording(); |
| return m_clipContentPicture; |
| } |