| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #include <new> | 7 #include <new> |
| 8 #include "SkBBoxHierarchy.h" | 8 #include "SkBBoxHierarchy.h" |
| 9 #include "SkDrawPictureCallback.h" | 9 #include "SkDrawPictureCallback.h" |
| 10 #include "SkPictureData.h" | 10 #include "SkPictureData.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 fOpData = SkSafeRef(src.fOpData); | 146 fOpData = SkSafeRef(src.fOpData); |
| 147 | 147 |
| 148 fBoundingHierarchy = src.fBoundingHierarchy; | 148 fBoundingHierarchy = src.fBoundingHierarchy; |
| 149 fStateTree = src.fStateTree; | 149 fStateTree = src.fStateTree; |
| 150 fContentInfo.set(src.fContentInfo); | 150 fContentInfo.set(src.fContentInfo); |
| 151 | 151 |
| 152 SkSafeRef(fBoundingHierarchy); | 152 SkSafeRef(fBoundingHierarchy); |
| 153 SkSafeRef(fStateTree); | 153 SkSafeRef(fStateTree); |
| 154 | 154 |
| 155 if (deepCopyInfo) { | 155 if (deepCopyInfo) { |
| 156 SkASSERT(deepCopyInfo->initialized); | |
| 157 | |
| 158 int paintCount = SafeCount(src.fPaints); | 156 int paintCount = SafeCount(src.fPaints); |
| 159 | 157 |
| 160 if (src.fBitmaps) { | 158 if (src.fBitmaps) { |
| 161 fBitmaps = SkTRefArray<SkBitmap>::Create(src.fBitmaps->begin(), src.
fBitmaps->count()); | 159 fBitmaps = SkTRefArray<SkBitmap>::Create(src.fBitmaps->begin(), src.
fBitmaps->count()); |
| 162 } | 160 } |
| 163 | 161 |
| 164 fPaints = SkTRefArray<SkPaint>::Create(paintCount); | 162 fPaints = SkTRefArray<SkPaint>::Create(paintCount); |
| 165 SkASSERT(deepCopyInfo->paintData.count() == paintCount); | 163 SkASSERT(deepCopyInfo->paintData.count() == paintCount); |
| 166 SkBitmapHeap* bmHeap = deepCopyInfo->controller.getBitmapHeap(); | 164 SkBitmapHeap* bmHeap = deepCopyInfo->controller.getBitmapHeap(); |
| 167 SkTypefacePlayback* tfPlayback = deepCopyInfo->controller.getTypefacePla
yback(); | 165 SkTypefacePlayback* tfPlayback = deepCopyInfo->controller.getTypefacePla
yback(); |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 for (index = 0; index < fPictureCount; index++) | 1217 for (index = 0; index < fPictureCount; index++) |
| 1220 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer
), | 1218 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer
), |
| 1221 "picture%p, ", fPictureRefs[index]); | 1219 "picture%p, ", fPictureRefs[index]); |
| 1222 if (fPictureCount > 0) | 1220 if (fPictureCount > 0) |
| 1223 SkDebugf("%s0};\n", pBuffer); | 1221 SkDebugf("%s0};\n", pBuffer); |
| 1224 | 1222 |
| 1225 const_cast<SkPictureData*>(this)->dumpStream(); | 1223 const_cast<SkPictureData*>(this)->dumpStream(); |
| 1226 } | 1224 } |
| 1227 | 1225 |
| 1228 #endif | 1226 #endif |
| OLD | NEW |