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

Unified Diff: samplecode/SamplePicture.cpp

Issue 888283002: allow GMs to animate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: switch all existing animations to use animatePulse Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SamplePathEffects.cpp ('k') | samplecode/SampleSpiral.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePicture.cpp
diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp
index c78571a89bbd0e29bbbf7b996831730d29ff177a..44c494017f44e389396ab2c2884df1961dd3a377 100644
--- a/samplecode/SamplePicture.cpp
+++ b/samplecode/SamplePicture.cpp
@@ -95,7 +95,7 @@ public:
protected:
// overrides from SkEventSink
- virtual bool onQuery(SkEvent* evt) {
+ bool onQuery(SkEvent* evt) SK_OVERRIDE {
if (SampleCode::TitleQ(*evt)) {
SampleCode::TitleR(evt, "Picture");
return true;
@@ -123,7 +123,7 @@ protected:
}
- virtual void onDrawContent(SkCanvas* canvas) {
+ void onDrawContent(SkCanvas* canvas) SK_OVERRIDE {
this->drawSomething(canvas);
SkPictureRecorder recorder;
@@ -150,22 +150,6 @@ protected:
canvas->translate(-SkIntToScalar(100), 0);
canvas->drawPicture(pict);
canvas->restore();
-
-#ifdef SK_DEVELOPER
- if (false) {
- SkDebugfDumper dumper;
- SkDumpCanvas dumpCanvas(&dumper);
- dumpCanvas.drawPicture(pict);
- }
-#endif
-
- // This used to re-record the sub-picture and redraw the parent
- // A capability that is now forbidden!
-
- SkRandom rand(SampleCode::GetAnimTime());
- canvas->translate(SkIntToScalar(10), SkIntToScalar(250));
- canvas->drawPicture(fPicture);
- delayInval(500);
}
private:
@@ -175,7 +159,7 @@ private:
(new SkEvent(INVAL_ALL_TYPE, this->getSinkID()))->postDelay(delay);
}
- virtual bool onEvent(const SkEvent& evt) {
+ bool onEvent(const SkEvent& evt) SK_OVERRIDE {
if (evt.isType(INVAL_ALL_TYPE)) {
this->inval(NULL);
return true;
« no previous file with comments | « samplecode/SamplePathEffects.cpp ('k') | samplecode/SampleSpiral.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698