| 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 |
| 267 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { | 280 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { |
| 268 this->endRecording(); | 281 this->endRecording(); |
| 269 if (NULL != fPlayback) { | 282 if (NULL != fPlayback) { |
| 270 fPlayback->draw(*surface, callback); | 283 fPlayback->draw(*surface, callback); |
| 271 } | 284 } |
| 272 } | 285 } |
| 273 | 286 |
| 274 /////////////////////////////////////////////////////////////////////////////// | 287 /////////////////////////////////////////////////////////////////////////////// |
| 275 | 288 |
| 276 #include "SkStream.h" | 289 #include "SkStream.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 455 } |
| 443 | 456 |
| 444 #ifdef SK_BUILD_FOR_ANDROID | 457 #ifdef SK_BUILD_FOR_ANDROID |
| 445 void SkPicture::abortPlayback() { | 458 void SkPicture::abortPlayback() { |
| 446 if (NULL == fPlayback) { | 459 if (NULL == fPlayback) { |
| 447 return; | 460 return; |
| 448 } | 461 } |
| 449 fPlayback->abort(); | 462 fPlayback->abort(); |
| 450 } | 463 } |
| 451 #endif | 464 #endif |
| OLD | NEW |