| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 283 } |
| 284 SkASSERT(NULL == fRecord); | 284 SkASSERT(NULL == fRecord); |
| 285 } | 285 } |
| 286 | 286 |
| 287 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() { | 287 const SkPicture::OperationList& SkPicture::OperationList::InvalidList() { |
| 288 static OperationList gInvalid; | 288 static OperationList gInvalid; |
| 289 return gInvalid; | 289 return gInvalid; |
| 290 } | 290 } |
| 291 | 291 |
| 292 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe
ct& queryRect) { | 292 const SkPicture::OperationList& SkPicture::EXPERIMENTAL_getActiveOps(const SkIRe
ct& queryRect) { |
| 293 this->endRecording(); | 293 this->endRecording(); // TODO: remove eventually |
| 294 if (NULL != fPlayback) { | 294 if (NULL != fPlayback) { |
| 295 return fPlayback->getActiveOps(queryRect); | 295 return fPlayback->getActiveOps(queryRect); |
| 296 } | 296 } |
| 297 return OperationList::InvalidList(); | 297 return OperationList::InvalidList(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 size_t SkPicture::EXPERIMENTAL_curOpID() const { | 300 size_t SkPicture::EXPERIMENTAL_curOpID() const { |
| 301 if (NULL != fPlayback) { | 301 if (NULL != fPlayback) { |
| 302 return fPlayback->curOpID(); | 302 return fPlayback->curOpID(); |
| 303 } | 303 } |
| 304 return 0; | 304 return 0; |
| 305 } | 305 } |
| 306 | 306 |
| 307 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { | 307 void SkPicture::draw(SkCanvas* surface, SkDrawPictureCallback* callback) { |
| 308 this->endRecording(); | 308 this->endRecording(); // TODO: remove eventually |
| 309 if (NULL != fPlayback) { | 309 if (NULL != fPlayback) { |
| 310 fPlayback->draw(*surface, callback); | 310 fPlayback->draw(*surface, callback); |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 | 313 |
| 314 /////////////////////////////////////////////////////////////////////////////// | 314 /////////////////////////////////////////////////////////////////////////////// |
| 315 | 315 |
| 316 #include "SkStream.h" | 316 #include "SkStream.h" |
| 317 | 317 |
| 318 static const char kMagic[] = { 's', 'k', 'i', 'a', 'p', 'i', 'c', 't' }; | 318 static const char kMagic[] = { 's', 'k', 'i', 'a', 'p', 'i', 'c', 't' }; |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 if (NULL != fRecord) { | 514 if (NULL != fRecord) { |
| 515 SkASSERT(NULL == fPlayback); | 515 SkASSERT(NULL == fPlayback); |
| 516 return SK_InvalidGenID; | 516 return SK_InvalidGenID; |
| 517 } | 517 } |
| 518 | 518 |
| 519 if (SK_InvalidGenID == fUniqueID) { | 519 if (SK_InvalidGenID == fUniqueID) { |
| 520 fUniqueID = next_picture_generation_id(); | 520 fUniqueID = next_picture_generation_id(); |
| 521 } | 521 } |
| 522 return fUniqueID; | 522 return fUniqueID; |
| 523 } | 523 } |
| OLD | NEW |