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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } | 267 } |
268 SkASSERT(NULL == fRecord); | 268 SkASSERT(NULL == fRecord); |
269 } | 269 } |
270 | 270 |
271 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() { | 271 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() { |
272 static OperationList gInvalid; | 272 static OperationList gInvalid; |
273 return gInvalid; | 273 return gInvalid; |
274 } | 274 } |
275 | 275 |
276 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe
ct& queryRect) { | 276 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe
ct& queryRect) { |
277 this->endRecording(); | 277 this->endRecording(); // TODO: remove eventually |
278 if (NULL != fPlayback) { | 278 if (NULL != fPlayback) { |
279 return fPlayback->getActiveOps(queryRect); | 279 return fPlayback->getActiveOps(queryRect); |
280 } | 280 } |
281 return OperationList::InvalidList(); | 281 return OperationList::InvalidList(); |
282 } | 282 } |
283 | 283 |
284 size_t SkPicture::EXPERIMENTAL_curOpID() const { | 284 size_t SkPicture::EXPERIMENTAL_curOpID() const { |
285 if (NULL != fPlayback) { | 285 if (NULL != fPlayback) { |
286 return fPlayback->curOpID(); | 286 return fPlayback->curOpID(); |
287 } | 287 } |
288 return 0; | 288 return 0; |
289 } | 289 } |
290 | 290 |
291 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { | 291 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { |
292 this->endRecording(); | 292 this->endRecording(); // TODO: remove eventually |
293 if (NULL != fPlayback) { | 293 if (NULL != fPlayback) { |
294 fPlayback->draw(*surface, callback); | 294 fPlayback->draw(*surface, callback); |
295 } | 295 } |
296 } | 296 } |
297 | 297 |
298 /////////////////////////////////////////////////////////////////////////////// | 298 /////////////////////////////////////////////////////////////////////////////// |
299 | 299 |
300 #include "SkStream.h" | 300 #include "SkStream.h" |
301 | 301 |
302 static const char kMagic[] = { 's', 'k', 'i', 'a', 'p', 'i', 'c', 't' }; | 302 static const char kMagic[] = { 's', 'k', 'i', 'a', 'p', 'i', 'c', 't' }; |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 } | 473 } |
474 | 474 |
475 #ifdef SK_BUILD_FOR_ANDROID | 475 #ifdef SK_BUILD_FOR_ANDROID |
476 void SkPicture::abortPlayback() { | 476 void SkPicture::abortPlayback() { |
477 if (NULL == fPlayback) { | 477 if (NULL == fPlayback) { |
478 return; | 478 return; |
479 } | 479 } |
480 fPlayback->abort(); | 480 fPlayback->abort(); |
481 } | 481 } |
482 #endif | 482 #endif |
OLD | NEW |