aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleAtlas.cpp
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2016-06-16 09:52:35 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-16 09:52:35 -0700
commitc7027ab03f2e8bab4c74bc1b047642622d3d682b (patch)
tree72baa4e6345d6e3bbdb2b0165130a637a9778f19 /samplecode/SampleAtlas.cpp
parentc4ce6b592487305de251bbebaf8eeee38371b877 (diff)
Add samples to Viewer.
This adds support with animation, assuming the sample has implemented onAnimate. Event handling has not been implemented. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056343004 Committed: https://skia.googlesource.com/skia/+/76963e73704a42a18c29d6fbdcccb566e5c67658 Review-Url: https://codereview.chromium.org/2056343004
Diffstat (limited to 'samplecode/SampleAtlas.cpp')
-rw-r--r--samplecode/SampleAtlas.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/samplecode/SampleAtlas.cpp b/samplecode/SampleAtlas.cpp
index 7cf1bb3761..3daf312f6a 100644
--- a/samplecode/SampleAtlas.cpp
+++ b/samplecode/SampleAtlas.cpp
@@ -232,9 +232,11 @@ protected:
void onDrawContent(SkCanvas* canvas) override {
canvas->drawDrawable(fDrawable);
- this->inval(nullptr);
}
+ bool onAnimate(const SkAnimTimer&) override {
+ return true;
+ }
#if 0
// TODO: switch over to use this for our animation
bool onAnimate(const SkAnimTimer& timer) override {