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

Side by Side Diff: gm/gm.cpp

Issue 894083003: add SkAnimTimer, SPACE = pause/resume, ESP = stop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkShader.h" 9 #include "SkShader.h"
10 using namespace skiagm; 10 using namespace skiagm;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 if (fShortName.size() == 0) { 44 if (fShortName.size() == 0) {
45 fShortName = this->onShortName(); 45 fShortName = this->onShortName();
46 } 46 }
47 return fShortName.c_str(); 47 return fShortName.c_str();
48 } 48 }
49 49
50 void GM::setBGColor(SkColor color) { 50 void GM::setBGColor(SkColor color) {
51 fBGColor = color; 51 fBGColor = color;
52 } 52 }
53 53
54 bool GM::animatePulse(SkMSec curr, SkMSec prev) { 54 bool GM::animate(const SkAnimTimer& timer) {
55 return this->onAnimatePulse(curr, prev); 55 return this->onAnimate(timer);
56 } 56 }
57 57
58 //////////////////////////////////////////////////////////////////////////////// ///////////// 58 //////////////////////////////////////////////////////////////////////////////// /////////////
59 59
60 void GM::onDrawBackground(SkCanvas* canvas) { 60 void GM::onDrawBackground(SkCanvas* canvas) {
61 canvas->drawColor(fBGColor, SkXfermode::kSrc_Mode); 61 canvas->drawColor(fBGColor, SkXfermode::kSrc_Mode);
62 } 62 }
63 63
64 void GM::drawSizeBounds(SkCanvas* canvas, SkColor color) { 64 void GM::drawSizeBounds(SkCanvas* canvas, SkColor color) {
65 SkISize size = this->getISize(); 65 SkISize size = this->getISize();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 SkISize skiagm::SimpleGM::onISize() { 103 SkISize skiagm::SimpleGM::onISize() {
104 return fSize; 104 return fSize;
105 } 105 }
106 106
107 SkString skiagm::SimpleGM::onShortName() { 107 SkString skiagm::SimpleGM::onShortName() {
108 return fName; 108 return fName;
109 } 109 }
110 110
OLDNEW
« gm/SkAnimTimer.h ('K') | « gm/gm.h ('k') | samplecode/GMSampleView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698