aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar tomhudson <tomhudson@chromium.org>2014-08-18 15:07:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-18 15:07:13 -0700
commit60c2a79cfa8ceebcbafc243407564dc71f5e3b4f (patch)
tree6ad04385d0ec4aaf3d6ecc89eeec10eead08118e /include
parentf128f53a5bc36e2a991302cb40848df580ad515f (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 Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/364823009
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPicture.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 004f130621..d6c56ac883 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -305,7 +305,16 @@ private:
SkAutoTDelete<SkRecord> fRecord;
SkAutoTUnref<SkBBoxHierarchy> fBBH;
- bool fRecordWillPlayBackBitmaps; // TODO: const
+
+ struct Analysis {
+ Analysis()
+ : fWillPlaybackBitmaps(false)
+ , fSuitableForGpuRasterization(false) { }
+ Analysis(const SkRecord&);
+
+ bool fWillPlaybackBitmaps;
+ bool fSuitableForGpuRasterization;
+ } const fAnalysis;
};
#endif