OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkPictureFlat.h" | 10 #include "SkPictureFlat.h" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 NULL/*bbh*/, NULL/*callback*/); | 273 NULL/*bbh*/, NULL/*callback*/); |
274 return recorder.endRecording(); | 274 return recorder.endRecording(); |
275 } | 275 } |
276 | 276 |
277 // fRecord OK | 277 // fRecord OK |
278 SkPicture::~SkPicture() { | 278 SkPicture::~SkPicture() { |
279 this->callDeletionListeners(); | 279 this->callDeletionListeners(); |
280 } | 280 } |
281 | 281 |
282 // fRecord OK | 282 // fRecord OK |
283 #ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE | |
284 SkPicture* SkPicture::clone() const { | |
285 return SkRef(const_cast<SkPicture*>(this)); | |
286 } | |
287 #endif//SK_SUPPORT_LEGACY_PICTURE_CLONE | |
288 | |
289 // fRecord OK | |
290 void SkPicture::EXPERIMENTAL_addAccelData(const SkPicture::AccelData* data) cons
t { | 283 void SkPicture::EXPERIMENTAL_addAccelData(const SkPicture::AccelData* data) cons
t { |
291 fAccelData.reset(SkRef(data)); | 284 fAccelData.reset(SkRef(data)); |
292 } | 285 } |
293 | 286 |
294 // fRecord OK | 287 // fRecord OK |
295 const SkPicture::AccelData* SkPicture::EXPERIMENTAL_getAccelData( | 288 const SkPicture::AccelData* SkPicture::EXPERIMENTAL_getAccelData( |
296 SkPicture::AccelData::Key key) const { | 289 SkPicture::AccelData::Key key) const { |
297 if (fAccelData.get() && fAccelData->getKey() == key) { | 290 if (fAccelData.get() && fAccelData->getKey() == key) { |
298 return fAccelData.get(); | 291 return fAccelData.get(); |
299 } | 292 } |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 int SkPicture::approximateOpCount() const { | 673 int SkPicture::approximateOpCount() const { |
681 SkASSERT(fRecord.get() || fData.get()); | 674 SkASSERT(fRecord.get() || fData.get()); |
682 if (fRecord.get()) { | 675 if (fRecord.get()) { |
683 return fRecord->count(); | 676 return fRecord->count(); |
684 } | 677 } |
685 if (fData.get()) { | 678 if (fData.get()) { |
686 return fData->opCount(); | 679 return fData->opCount(); |
687 } | 680 } |
688 return 0; | 681 return 0; |
689 } | 682 } |
OLD | NEW |