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

Unified Diff: Source/core/layout/svg/LayoutSVGResourceClipper.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
« no previous file with comments | « no previous file | Source/core/layout/svg/LayoutSVGResourceMasker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | Source/core/layout/svg/LayoutSVGResourceMasker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698