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

Unified Diff: gm/gm.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 | « gm/gm.h ('k') | samplecode/GMSampleView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gm.cpp
diff --git a/gm/gm.cpp b/gm/gm.cpp
index ff17644fffc09bd2c7fcd0140565ac4eac28e72d..2b8a3d189f1e78de683a77bc70e4068b957df182 100644
--- a/gm/gm.cpp
+++ b/gm/gm.cpp
@@ -51,6 +51,12 @@ void GM::setBGColor(SkColor color) {
fBGColor = color;
}
+bool GM::animatePulse(SkMSec curr, SkMSec prev) {
+ return this->onAnimatePulse(curr, prev);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+
void GM::onDrawBackground(SkCanvas* canvas) {
canvas->drawColor(fBGColor, SkXfermode::kSrc_Mode);
}
@@ -78,3 +84,4 @@ SkISize skiagm::SimpleGM::onISize() {
SkString skiagm::SimpleGM::onShortName() {
return fName;
}
+
« no previous file with comments | « gm/gm.h ('k') | samplecode/GMSampleView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698