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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 } | 359 } |
360 } | 360 } |
361 SkASSERT(NULL == fRecord); | 361 SkASSERT(NULL == fRecord); |
362 } | 362 } |
363 | 363 |
364 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() { | 364 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() { |
365 static OperationList gInvalid; | 365 static OperationList gInvalid; |
366 return gInvalid; | 366 return gInvalid; |
367 } | 367 } |
368 | 368 |
369 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe
ct& queryRect) { | 369 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe
ct& queryRect) const { |
370 SkASSERT(NULL != fPlayback && NULL == fRecord); | 370 SkASSERT(NULL != fPlayback && NULL == fRecord); |
371 if (NULL != fPlayback) { | 371 if (NULL != fPlayback) { |
372 return fPlayback->getActiveOps(queryRect); | 372 return fPlayback->getActiveOps(queryRect); |
373 } | 373 } |
374 return OperationList::InvalidList(); | 374 return OperationList::InvalidList(); |
375 } | 375 } |
376 | 376 |
377 size_t SkPicture::EXPERIMENTAL_curOpID() const { | 377 size_t SkPicture::EXPERIMENTAL_curOpID() const { |
378 if (NULL != fPlayback) { | 378 if (NULL != fPlayback) { |
379 return fPlayback->curOpID(); | 379 return fPlayback->curOpID(); |
380 } | 380 } |
381 return 0; | 381 return 0; |
382 } | 382 } |
383 | 383 |
384 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { | 384 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) const { |
385 SkASSERT(NULL != fPlayback && NULL == fRecord); | 385 SkASSERT(NULL != fPlayback && NULL == fRecord); |
386 if (NULL != fPlayback) { | 386 if (NULL != fPlayback) { |
387 fPlayback->draw(*surface, callback); | 387 fPlayback->draw(*surface, callback); |
388 } | 388 } |
389 } | 389 } |
390 | 390 |
391 /////////////////////////////////////////////////////////////////////////////// | 391 /////////////////////////////////////////////////////////////////////////////// |
392 | 392 |
393 #include "SkStream.h" | 393 #include "SkStream.h" |
394 | 394 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 if (NULL != fRecord) { | 645 if (NULL != fRecord) { |
646 SkASSERT(NULL == fPlayback); | 646 SkASSERT(NULL == fPlayback); |
647 return SK_InvalidGenID; | 647 return SK_InvalidGenID; |
648 } | 648 } |
649 | 649 |
650 if (SK_InvalidGenID == fUniqueID) { | 650 if (SK_InvalidGenID == fUniqueID) { |
651 fUniqueID = next_picture_generation_id(); | 651 fUniqueID = next_picture_generation_id(); |
652 } | 652 } |
653 return fUniqueID; | 653 return fUniqueID; |
654 } | 654 } |
OLD | NEW |