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

Unified Diff: src/core/SkPictureRecord.cpp

Issue 1923393002: Revert of Enable flattening of SkRecordedDrawable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « src/core/SkPictureRecord.h ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 4a6ece17f25a8ce864601ffd706cdf2ebb4aa42a..afde01bbfb00907d12c1eb9edb665f5ebbc42ca9 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -33,7 +33,6 @@
SkPictureRecord::~SkPictureRecord() {
fImageRefs.unrefAll();
fPictureRefs.unrefAll();
- fDrawableRefs.unrefAll();
fTextBlobRefs.unrefAll();
}
@@ -634,23 +633,6 @@
this->addPaintPtr(paint);
this->addMatrix(m);
this->addPicture(picture);
- }
- this->validate(initialOffset, size);
-}
-
-void SkPictureRecord::onDrawDrawable(SkDrawable* drawable, const SkMatrix* matrix) {
- // op + drawable index
- size_t size = 2 * kUInt32Size;
- size_t initialOffset;
-
- if (nullptr == matrix) {
- initialOffset = this->addDraw(DRAW_DRAWABLE, &size);
- this->addDrawable(drawable);
- } else {
- size += matrix->writeToMemory(nullptr); // matrix
- initialOffset = this->addDraw(DRAW_DRAWABLE_MATRIX, &size);
- this->addMatrix(*matrix);
- this->addDrawable(drawable);
}
this->validate(initialOffset, size);
}
@@ -936,17 +918,6 @@
this->addInt(index + 1);
}
-void SkPictureRecord::addDrawable(SkDrawable* drawable) {
- int index = fDrawableRefs.find(drawable);
- if (index < 0) { // not found
- index = fDrawableRefs.count();
- *fDrawableRefs.append() = drawable;
- drawable->ref();
- }
- // follow the convention of recording a 1-based index
- this->addInt(index + 1);
-}
-
void SkPictureRecord::addPoint(const SkPoint& point) {
fWriter.writePoint(point);
}
« no previous file with comments | « src/core/SkPictureRecord.h ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698