Index: src/core/SkPicturePlayback.cpp |
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp |
index c3f24b95e1f801566973888b460b3056ba88baa1..148237a5a8ffee471e96158f2f5356f518b0e3cd 100644 |
--- a/src/core/SkPicturePlayback.cpp |
+++ b/src/core/SkPicturePlayback.cpp |
@@ -168,6 +168,7 @@ SkPicturePlayback::SkPicturePlayback(const SkPictureRecord& record, |
#endif |
} |
+#ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE |
SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInfo* deepCopyInfo) |
: fInfo(src.fInfo) { |
this->init(); |
@@ -223,6 +224,32 @@ SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src, SkPictCopyInf |
} |
} |
} |
+#else |
robertphillips
2014/06/27 18:03:50
Do we even need this?
mtklein
2014/06/27 18:32:04
Yeah, tried but failed to remove it. We copy SkPi
|
+SkPicturePlayback::SkPicturePlayback(const SkPicturePlayback& src) : 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); |
+ |
+ fBitmaps = SkSafeRef(src.fBitmaps); |
+ fPaints = SkSafeRef(src.fPaints); |
+ |
+ fPictureCount = src.fPictureCount; |
+ fPictureRefs = SkNEW_ARRAY(const SkPicture*, fPictureCount); |
+ for (int i = 0; i < fPictureCount; i++) { |
+ fPictureRefs[i] = SkRef(src.fPictureRefs[i]); |
+ } |
+} |
+#endif//SK_SUPPORT_LEGACY_PICTURE_CLONE |
void SkPicturePlayback::init() { |
fBitmaps = NULL; |