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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 if (NULL == fPlayback) { | 257 if (NULL == fPlayback) { |
258 if (NULL != fRecord) { | 258 if (NULL != fRecord) { |
259 fRecord->endRecording(); | 259 fRecord->endRecording(); |
260 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); | 260 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); |
261 SkSafeSetNull(fRecord); | 261 SkSafeSetNull(fRecord); |
262 } | 262 } |
263 } | 263 } |
264 SkASSERT(NULL == fRecord); | 264 SkASSERT(NULL == fRecord); |
265 } | 265 } |
266 | 266 |
267 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() { | |
268 static OperationList gInvalid; | |
269 return gInvalid; | |
270 } | |
271 | |
272 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe
ct& queryRect) { | |
273 this->endRecording(); | |
274 if (NULL != fPlayback) { | |
275 return fPlayback->getActiveOps(queryRect); | |
276 } | |
277 return OperationList::InvalidList(); | |
278 } | |
279 | |
280 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { | 267 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { |
281 this->endRecording(); | 268 this->endRecording(); |
282 if (NULL != fPlayback) { | 269 if (NULL != fPlayback) { |
283 fPlayback->draw(*surface, callback); | 270 fPlayback->draw(*surface, callback); |
284 } | 271 } |
285 } | 272 } |
286 | 273 |
287 /////////////////////////////////////////////////////////////////////////////// | 274 /////////////////////////////////////////////////////////////////////////////// |
288 | 275 |
289 #include "SkStream.h" | 276 #include "SkStream.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 } | 442 } |
456 | 443 |
457 #ifdef SK_BUILD_FOR_ANDROID | 444 #ifdef SK_BUILD_FOR_ANDROID |
458 void SkPicture::abortPlayback() { | 445 void SkPicture::abortPlayback() { |
459 if (NULL == fPlayback) { | 446 if (NULL == fPlayback) { |
460 return; | 447 return; |
461 } | 448 } |
462 fPlayback->abort(); | 449 fPlayback->abort(); |
463 } | 450 } |
464 #endif | 451 #endif |
OLD | NEW |