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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 playback->flatten(buffer); | 444 playback->flatten(buffer); |
445 // delete playback if it is a local version (i.e. cons'd up just now) | 445 // delete playback if it is a local version (i.e. cons'd up just now) |
446 if (playback != fPlayback) { | 446 if (playback != fPlayback) { |
447 SkDELETE(playback); | 447 SkDELETE(playback); |
448 } | 448 } |
449 } else { | 449 } else { |
450 buffer.writeBool(false); | 450 buffer.writeBool(false); |
451 } | 451 } |
452 } | 452 } |
453 | 453 |
| 454 #if SK_SUPPORT_GPU |
454 bool SkPicture::suitableForGpuRasterization(GrContext* context) const { | 455 bool SkPicture::suitableForGpuRasterization(GrContext* context) const { |
455 // Stub for now; never veto GPu rasterization. | 456 // Stub for now; never veto GPu rasterization. |
456 return true; | 457 return true; |
457 } | 458 } |
| 459 #endif |
458 | 460 |
459 bool SkPicture::willPlayBackBitmaps() const { | 461 bool SkPicture::willPlayBackBitmaps() const { |
460 if (!fPlayback) { | 462 if (!fPlayback) { |
461 return false; | 463 return false; |
462 } | 464 } |
463 return fPlayback->containsBitmaps(); | 465 return fPlayback->containsBitmaps(); |
464 } | 466 } |
465 | 467 |
466 #ifdef SK_BUILD_FOR_ANDROID | 468 #ifdef SK_BUILD_FOR_ANDROID |
467 void SkPicture::abortPlayback() { | 469 void SkPicture::abortPlayback() { |
468 if (NULL == fPlayback) { | 470 if (NULL == fPlayback) { |
469 return; | 471 return; |
470 } | 472 } |
471 fPlayback->abort(); | 473 fPlayback->abort(); |
472 } | 474 } |
473 #endif | 475 #endif |
OLD | NEW |