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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp

Issue 2500533003: Cache display items from SVGImage contents. (Closed)
Patch Set: none Created 4 years, 1 month 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 | « third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp b/third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp
index 90716fae096111d9e755a6eab993e3d4e857da26..cdc23e9bea6b68301636a58f35efa4d4f04a833b 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.cpp
@@ -13,14 +13,19 @@ namespace blink {
SkPictureBuilder::SkPictureBuilder(const FloatRect& bounds,
SkMetaData* metaData,
- GraphicsContext* containingContext)
- : m_bounds(bounds) {
+ GraphicsContext* containingContext,
+ PaintController* paintController)
+ : m_paintController(nullptr), m_bounds(bounds) {
GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisabled;
if (containingContext && containingContext->contextDisabled())
disabledMode = GraphicsContext::FullyDisabled;
- m_paintController = PaintController::create();
- m_paintController->beginSkippingCache();
+ if (paintController) {
+ m_paintController = paintController;
+ } else {
+ m_paintControllerPtr = PaintController::create();
+ m_paintController = m_paintControllerPtr.get();
+ }
m_context = wrapUnique(
new GraphicsContext(*m_paintController, disabledMode, metaData));
@@ -34,7 +39,6 @@ SkPictureBuilder::~SkPictureBuilder() {}
sk_sp<SkPicture> SkPictureBuilder::endRecording() {
m_context->beginRecording(m_bounds);
- m_paintController->endSkippingCache();
m_paintController->commitNewDisplayItems();
m_paintController->paintArtifact().replay(*m_context);
return m_context->endRecording();
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698