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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 if (NULL != reason) { | 386 if (NULL != reason) { |
387 *reason = "Missing internal data."; | 387 *reason = "Missing internal data."; |
388 } | 388 } |
389 return false; | 389 return false; |
390 } | 390 } |
391 | 391 |
392 return fData->suitableForGpuRasterization(context, reason); | 392 return fData->suitableForGpuRasterization(context, reason); |
393 } | 393 } |
394 #endif | 394 #endif |
395 | 395 |
| 396 // fRecord TODO |
| 397 bool SkPicture::hasText() const { |
| 398 return fData.get() && fData->hasText(); |
| 399 } |
| 400 |
396 // fRecord OK | 401 // fRecord OK |
397 bool SkPicture::willPlayBackBitmaps() const { | 402 bool SkPicture::willPlayBackBitmaps() const { |
398 if (fRecord.get()) { | 403 if (fRecord.get()) { |
399 return fRecordWillPlayBackBitmaps; | 404 return fRecordWillPlayBackBitmaps; |
400 } | 405 } |
401 if (!fData.get()) { | 406 if (!fData.get()) { |
402 return false; | 407 return false; |
403 } | 408 } |
404 return fData->containsBitmaps(); | 409 return fData->containsBitmaps(); |
405 } | 410 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 int SkPicture::approximateOpCount() const { | 465 int SkPicture::approximateOpCount() const { |
461 SkASSERT(fRecord.get() || fData.get()); | 466 SkASSERT(fRecord.get() || fData.get()); |
462 if (fRecord.get()) { | 467 if (fRecord.get()) { |
463 return fRecord->count(); | 468 return fRecord->count(); |
464 } | 469 } |
465 if (fData.get()) { | 470 if (fData.get()) { |
466 return fData->opCount(); | 471 return fData->opCount(); |
467 } | 472 } |
468 return 0; | 473 return 0; |
469 } | 474 } |
OLD | NEW |