OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |