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

Unified Diff: gm/gm.h

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 | « gm/addarc.cpp ('k') | gm/gm.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gm.h
diff --git a/gm/gm.h b/gm/gm.h
index b474729366adcb505409c0f76f977308add8b4a2..edb92b201e8dd18b26b9f7a96a96a9df0fd69c62 100644
--- a/gm/gm.h
+++ b/gm/gm.h
@@ -92,6 +92,8 @@ namespace skiagm {
fStarterMatrix = matrix;
}
+ bool animatePulse(SkMSec curr, SkMSec prev);
+
protected:
virtual void onOnceBeforeDraw() {}
virtual void onDraw(SkCanvas*) = 0;
@@ -99,6 +101,7 @@ namespace skiagm {
virtual SkISize onISize() = 0;
virtual SkString onShortName() = 0;
+ virtual bool onAnimatePulse(SkMSec curr, SkMSec prev) { return false; }
virtual SkMatrix onGetInitialTransform() const { return SkMatrix::I(); }
private:
« no previous file with comments | « gm/addarc.cpp ('k') | gm/gm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698