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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 if (NULL == fPlayback) { | 241 if (NULL == fPlayback) { |
242 if (NULL != fRecord) { | 242 if (NULL != fRecord) { |
243 fRecord->endRecording(); | 243 fRecord->endRecording(); |
244 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); | 244 fPlayback = SkNEW_ARGS(SkPicturePlayback, (*fRecord)); |
245 SkSafeSetNull(fRecord); | 245 SkSafeSetNull(fRecord); |
246 } | 246 } |
247 } | 247 } |
248 SkASSERT(NULL == fRecord); | 248 SkASSERT(NULL == fRecord); |
249 } | 249 } |
250 | 250 |
| 251 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() { |
| 252 static OperationList gInvalid; |
| 253 return gInvalid; |
| 254 } |
| 255 |
| 256 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe
ct& queryRect) { |
| 257 this->endRecording(); |
| 258 if (NULL != fPlayback) { |
| 259 return fPlayback->getActiveOps(queryRect); |
| 260 } |
| 261 return OperationList::InvalidList(); |
| 262 } |
| 263 |
251 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { | 264 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { |
252 this->endRecording(); | 265 this->endRecording(); |
253 if (fPlayback) { | 266 if (fPlayback) { |
254 fPlayback->draw(*surface, callback); | 267 fPlayback->draw(*surface, callback); |
255 } | 268 } |
256 } | 269 } |
257 | 270 |
258 /////////////////////////////////////////////////////////////////////////////// | 271 /////////////////////////////////////////////////////////////////////////////// |
259 | 272 |
260 #include "SkStream.h" | 273 #include "SkStream.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 436 } |
424 | 437 |
425 #ifdef SK_BUILD_FOR_ANDROID | 438 #ifdef SK_BUILD_FOR_ANDROID |
426 void SkPicture::abortPlayback() { | 439 void SkPicture::abortPlayback() { |
427 if (NULL == fPlayback) { | 440 if (NULL == fPlayback) { |
428 return; | 441 return; |
429 } | 442 } |
430 fPlayback->abort(); | 443 fPlayback->abort(); |
431 } | 444 } |
432 #endif | 445 #endif |
OLD | NEW |