| 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 bool SkPicture::suitableForGpuRasterization(GrContext* context, const char **rea
son) const { | 448 bool SkPicture::suitableForGpuRasterization(GrContext* context, const char **rea
son) const { |
| 449 if (NULL == fData.get()) { | 449 if (NULL == fData.get()) { |
| 450 if (NULL != reason) { | 450 if (NULL != reason) { |
| 451 *reason = "Missing internal data."; | 451 *reason = "Missing internal data."; |
| 452 } | 452 } |
| 453 return false; | 453 return false; |
| 454 } | 454 } |
| 455 | 455 |
| 456 return fData->suitableForGpuRasterization(context, reason); | 456 return fData->suitableForGpuRasterization(context, reason); |
| 457 } | 457 } |
| 458 |
| 459 bool SkPicture::suitableForOptimization() const { |
| 460 return fData->suitableForOptimization(); |
| 461 } |
| 462 |
| 458 #endif | 463 #endif |
| 459 | 464 |
| 460 // fRecord OK | 465 // fRecord OK |
| 461 bool SkPicture::willPlayBackBitmaps() const { | 466 bool SkPicture::willPlayBackBitmaps() const { |
| 462 if (fRecord.get()) { | 467 if (fRecord.get()) { |
| 463 return fRecordWillPlayBackBitmaps; | 468 return fRecordWillPlayBackBitmaps; |
| 464 } | 469 } |
| 465 if (!fData.get()) { | 470 if (!fData.get()) { |
| 466 return false; | 471 return false; |
| 467 } | 472 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 *fDeletionListeners.append() = SkRef(listener); | 517 *fDeletionListeners.append() = SkRef(listener); |
| 513 } | 518 } |
| 514 | 519 |
| 515 void SkPicture::callDeletionListeners() { | 520 void SkPicture::callDeletionListeners() { |
| 516 for (int i = 0; i < fDeletionListeners.count(); ++i) { | 521 for (int i = 0; i < fDeletionListeners.count(); ++i) { |
| 517 fDeletionListeners[i]->onDeletion(this->uniqueID()); | 522 fDeletionListeners[i]->onDeletion(this->uniqueID()); |
| 518 } | 523 } |
| 519 | 524 |
| 520 fDeletionListeners.unrefAll(); | 525 fDeletionListeners.unrefAll(); |
| 521 } | 526 } |
| OLD | NEW |