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

Unified Diff: Source/core/layout/svg/LayoutSVGResourcePattern.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/LayoutSVGResourcePattern.cpp
diff --git a/Source/core/layout/svg/LayoutSVGResourcePattern.cpp b/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
index 4dc3f7d11bd18ce7dd9346f764709ad7b70e91c2..0e2cbc515e6e07cca9ac175809e0f4e901911626 100644
--- a/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
+++ b/Source/core/layout/svg/LayoutSVGResourcePattern.cpp
@@ -29,7 +29,7 @@
#include "core/svg/SVGFitToViewBox.h"
#include "core/svg/SVGPatternElement.h"
#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/paint/DisplayItemList.h"
+#include "platform/graphics/paint/DisplayItemListPictureRecorder.h"
#include "third_party/skia/include/core/SkPicture.h"
namespace blink {
@@ -166,11 +166,8 @@ PassRefPtr<const SkPicture> LayoutSVGResourcePattern::asPicture(const FloatRect&
contentTransform = tileTransform;
// Draw the content into a Picture.
- OwnPtr<DisplayItemList> displayItemList;
- if (RuntimeEnabledFeatures::slimmingPaintEnabled())
- displayItemList = DisplayItemList::create();
- GraphicsContext recordingContext(nullptr, displayItemList.get());
- recordingContext.beginRecording(FloatRect(FloatPoint(), tileBounds.size()));
+ DisplayItemListPictureRecorder pictureRecorder(FloatRect(FloatPoint(), tileBounds.size()));
+ GraphicsContext& recordingContext = pictureRecorder.context();
ASSERT(attributes().patternContentElement());
LayoutSVGResourceContainer* patternLayoutObject =
@@ -186,9 +183,7 @@ PassRefPtr<const SkPicture> LayoutSVGResourcePattern::asPicture(const FloatRect&
SVGPaintContext::paintSubtree(&recordingContext, child);
}
- if (displayItemList)
- displayItemList->replay(&recordingContext);
- return recordingContext.endRecording();
+ return pictureRecorder.endRecording();
}
}

Powered by Google App Engine
This is Rietveld 408576698