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 SkTDArray<void*>* SkPicture::EXPERIMENTAL_getActiveOps(const SkIRect& que
ryRect) { |
| 252 this->endRecording(); |
| 253 if (NULL != fPlayback) { |
| 254 return fPlayback->getActiveOps(queryRect); |
| 255 } |
| 256 return NULL; |
| 257 } |
| 258 |
251 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { | 259 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { |
252 this->endRecording(); | 260 this->endRecording(); |
253 if (fPlayback) { | 261 if (fPlayback) { |
254 fPlayback->draw(*surface, callback); | 262 fPlayback->draw(*surface, callback); |
255 } | 263 } |
256 } | 264 } |
257 | 265 |
258 /////////////////////////////////////////////////////////////////////////////// | 266 /////////////////////////////////////////////////////////////////////////////// |
259 | 267 |
260 #include "SkStream.h" | 268 #include "SkStream.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 431 } |
424 | 432 |
425 #ifdef SK_BUILD_FOR_ANDROID | 433 #ifdef SK_BUILD_FOR_ANDROID |
426 void SkPicture::abortPlayback() { | 434 void SkPicture::abortPlayback() { |
427 if (NULL == fPlayback) { | 435 if (NULL == fPlayback) { |
428 return; | 436 return; |
429 } | 437 } |
430 fPlayback->abort(); | 438 fPlayback->abort(); |
431 } | 439 } |
432 #endif | 440 #endif |
OLD | NEW |