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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } else { | 136 } else { |
137 fPlayback = NULL; | 137 fPlayback = NULL; |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 SkPicture::~SkPicture() { | 141 SkPicture::~SkPicture() { |
142 SkSafeUnref(fRecord); | 142 SkSafeUnref(fRecord); |
143 SkDELETE(fPlayback); | 143 SkDELETE(fPlayback); |
144 } | 144 } |
145 | 145 |
| 146 void SkPicture::internalOnly_EnableOpts(bool enableOpts) { |
| 147 if (NULL != fRecord) { |
| 148 fRecord->internalOnly_EnableOpts(enableOpts); |
| 149 } |
| 150 } |
| 151 |
146 void SkPicture::swap(SkPicture& other) { | 152 void SkPicture::swap(SkPicture& other) { |
147 SkTSwap(fRecord, other.fRecord); | 153 SkTSwap(fRecord, other.fRecord); |
148 SkTSwap(fPlayback, other.fPlayback); | 154 SkTSwap(fPlayback, other.fPlayback); |
149 SkTSwap(fWidth, other.fWidth); | 155 SkTSwap(fWidth, other.fWidth); |
150 SkTSwap(fHeight, other.fHeight); | 156 SkTSwap(fHeight, other.fHeight); |
151 } | 157 } |
152 | 158 |
153 SkPicture* SkPicture::clone() const { | 159 SkPicture* SkPicture::clone() const { |
154 SkPicture* clonedPicture = SkNEW(SkPicture); | 160 SkPicture* clonedPicture = SkNEW(SkPicture); |
155 clone(clonedPicture, 1); | 161 clone(clonedPicture, 1); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 } | 430 } |
425 | 431 |
426 #ifdef SK_BUILD_FOR_ANDROID | 432 #ifdef SK_BUILD_FOR_ANDROID |
427 void SkPicture::abortPlayback() { | 433 void SkPicture::abortPlayback() { |
428 if (NULL == fPlayback) { | 434 if (NULL == fPlayback) { |
429 return; | 435 return; |
430 } | 436 } |
431 fPlayback->abort(); | 437 fPlayback->abort(); |
432 } | 438 } |
433 #endif | 439 #endif |
OLD | NEW |