diff options
author | 2014-08-20 05:29:41 -0700 | |
---|---|---|
committer | 2014-08-20 05:29:41 -0700 | |
commit | 3a0f27916712bb3226874aeaa268e30f565880de (patch) | |
tree | ebfd03a22ebe5a22a709ee5cc09ff4c8a74d3e07 /include/core/SkPicture.h | |
parent | 5dfe779c2e684e3e1aacfa24aa7be9c9da1598f9 (diff) |
Move the code over using the same template type approach previously used for willPlayBackBitmaps in http://skbug.com/2702.
Also unifies that flag and this one into a struct so they and others can be computed together. The struct is stored const to enforce lifetime expectations. Adds a few new cases to the unit test.
BUG=skia:2700
R=mtklein@google.com, reed@google.com, robertphillips@google.com, tomhudson@google.com
Committed: https://skia.googlesource.com/skia/+/60c2a79cfa8ceebcbafc243407564dc71f5e3b4f
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/364823009
Diffstat (limited to 'include/core/SkPicture.h')
-rw-r--r-- | include/core/SkPicture.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index 004f130621..f1ff19cc2e 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -305,7 +305,20 @@ private: SkAutoTDelete<SkRecord> fRecord; SkAutoTUnref<SkBBoxHierarchy> fBBH; - bool fRecordWillPlayBackBitmaps; // TODO: const + + struct Analysis { + // To get setup to work cleanly, we cast away constness and call init() + // instead of trying to set everything during construction. + void init(const SkRecord&); + + bool suitableForGpuRasterization(const char** reason, int sampleCount) const; + + bool fWillPlaybackBitmaps; + int fNumPaintWithPathEffectUses; + int fNumFastPathDashEffects; + int fNumAAConcavePaths; + int fNumAAHairlineConcavePaths; + } const fAnalysis; }; #endif |