| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 playback->flatten(buffer); | 417 playback->flatten(buffer); |
| 418 // delete playback if it is a local version (i.e. cons'd up just now) | 418 // delete playback if it is a local version (i.e. cons'd up just now) |
| 419 if (playback != fPlayback) { | 419 if (playback != fPlayback) { |
| 420 SkDELETE(playback); | 420 SkDELETE(playback); |
| 421 } | 421 } |
| 422 } else { | 422 } else { |
| 423 buffer.writeBool(false); | 423 buffer.writeBool(false); |
| 424 } | 424 } |
| 425 } | 425 } |
| 426 | 426 |
| 427 bool SkPicture::suitableForGpuRasterization() const { |
| 428 // Stub for now; never veto GPu rasterization. |
| 429 return true; |
| 430 } |
| 431 |
| 427 bool SkPicture::willPlayBackBitmaps() const { | 432 bool SkPicture::willPlayBackBitmaps() const { |
| 428 if (!fPlayback) return false; | 433 if (!fPlayback) return false; |
| 429 return fPlayback->containsBitmaps(); | 434 return fPlayback->containsBitmaps(); |
| 430 } | 435 } |
| 431 | 436 |
| 432 #ifdef SK_BUILD_FOR_ANDROID | 437 #ifdef SK_BUILD_FOR_ANDROID |
| 433 void SkPicture::abortPlayback() { | 438 void SkPicture::abortPlayback() { |
| 434 if (NULL == fPlayback) { | 439 if (NULL == fPlayback) { |
| 435 return; | 440 return; |
| 436 } | 441 } |
| 437 fPlayback->abort(); | 442 fPlayback->abort(); |
| 438 } | 443 } |
| 439 #endif | 444 #endif |
| OLD | NEW |