diff options
author | reed <reed@google.com> | 2014-11-18 11:08:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-18 11:08:05 -0800 |
commit | 6be2aa9a251bf6022570a03140f956655b3ef1da (patch) | |
tree | 52ccd2b4fd1fde02617f08ee03d30faee917c38f /samplecode/SampleArc.cpp | |
parent | ad3a8846f8963e03faa6de647502e1c553161ecb (diff) |
wip for drawables
Idea:
1. in its mutable recording state, keep a table of drawables on the side, and store an index in the record list.
2. In "immediate-mode" draw, just call the clients drawable directly (need access to our private list to turn the stored index into a proc)
3. when we "snap", we replace the list of drawables with a list of (sub) pictures, and then during playback of the snapped picture, we invoke a private drawable which just calls "drawPicture" on the index'd subpicture.
Review URL: https://codereview.chromium.org/727363003
Diffstat (limited to 'samplecode/SampleArc.cpp')
-rw-r--r-- | samplecode/SampleArc.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/samplecode/SampleArc.cpp b/samplecode/SampleArc.cpp index c9310d6dd6..a44eeb59ba 100644 --- a/samplecode/SampleArc.cpp +++ b/samplecode/SampleArc.cpp @@ -72,6 +72,12 @@ class ArcsView : public SampleView { paint.setColor(SK_ColorBLUE); canvas->drawArc(fR, 0, fSweep, false, paint); } + + SkRect onGetBounds() SK_OVERRIDE { + SkRect r(fR); + r.outset(2, 2); + return r; + } }; public: |