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

Unified Diff: src/core/SkPictureData.cpp

Issue 620533002: Remove support for SkPicture::clone(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: todo Created 6 years, 3 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/SkPictureData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureData.cpp
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp
index fbef0e8e55be87ee33a2e656a5e517158fccafeb..877c3f4c33eaa0cece8f305e0bda6b0f96b89b3f 100644
--- a/src/core/SkPictureData.cpp
+++ b/src/core/SkPictureData.cpp
@@ -89,62 +89,6 @@ SkPictureData::SkPictureData(const SkPictureRecord& record,
}
}
-#ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE
-SkPictureData::SkPictureData(const SkPictureData& src, SkPictCopyInfo* deepCopyInfo)
- : fInfo(src.fInfo) {
- this->init();
-
- fBitmapHeap.reset(SkSafeRef(src.fBitmapHeap.get()));
- fPathHeap.reset(SkSafeRef(src.fPathHeap.get()));
-
- fOpData = SkSafeRef(src.fOpData);
-
- fBoundingHierarchy = src.fBoundingHierarchy;
- fStateTree = src.fStateTree;
- fContentInfo.set(src.fContentInfo);
-
- SkSafeRef(fBoundingHierarchy);
- SkSafeRef(fStateTree);
-
- if (deepCopyInfo) {
- int paintCount = SafeCount(src.fPaints);
-
- if (src.fBitmaps) {
- fBitmaps = SkTRefArray<SkBitmap>::Create(src.fBitmaps->begin(), src.fBitmaps->count());
- }
-
- fPaints = SkTRefArray<SkPaint>::Create(paintCount);
- SkASSERT(deepCopyInfo->paintData.count() == paintCount);
- SkBitmapHeap* bmHeap = deepCopyInfo->controller.getBitmapHeap();
- SkTypefacePlayback* tfPlayback = deepCopyInfo->controller.getTypefacePlayback();
- for (int i = 0; i < paintCount; i++) {
- if (deepCopyInfo->paintData[i]) {
- deepCopyInfo->paintData[i]->unflatten<SkPaintFlatteningTraits>(
- &fPaints->writableAt(i), bmHeap, tfPlayback);
- } else {
- // needs_deep_copy was false, so just need to assign
- fPaints->writableAt(i) = src.fPaints->at(i);
- }
- }
-
- } else {
- fBitmaps = SkSafeRef(src.fBitmaps);
- fPaints = SkSafeRef(src.fPaints);
- }
-
- fPictureCount = src.fPictureCount;
- fPictureRefs = SkNEW_ARRAY(const SkPicture*, fPictureCount);
- for (int i = 0; i < fPictureCount; i++) {
- if (deepCopyInfo) {
- fPictureRefs[i] = src.fPictureRefs[i]->clone();
- } else {
- fPictureRefs[i] = src.fPictureRefs[i];
- fPictureRefs[i]->ref();
- }
- }
-}
-#endif//SK_SUPPORT_LEGACY_PICTURE_CLONE
-
void SkPictureData::init() {
fBitmaps = NULL;
fPaints = NULL;
« no previous file with comments | « src/core/SkPictureData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698