Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: src/core/SkPicture.cpp

Issue 478673002: Expose API for whether an SkPicture contains text (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add a test Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698