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 | 9 |
10 using namespace skiagm; | 10 using namespace skiagm; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 SkISize size = this->getISize(); | 59 SkISize size = this->getISize(); |
60 SkRect r = SkRect::MakeWH(SkIntToScalar(size.width()), | 60 SkRect r = SkRect::MakeWH(SkIntToScalar(size.width()), |
61 SkIntToScalar(size.height())); | 61 SkIntToScalar(size.height())); |
62 SkPaint paint; | 62 SkPaint paint; |
63 paint.setColor(color); | 63 paint.setColor(color); |
64 canvas->drawRect(r, paint); | 64 canvas->drawRect(r, paint); |
65 } | 65 } |
66 | 66 |
67 // need to explicitly declare this, or we get some weird infinite loop llist | 67 // need to explicitly declare this, or we get some weird infinite loop llist |
68 template GMRegistry* GMRegistry::gHead; | 68 template GMRegistry* GMRegistry::gHead; |
| 69 |
| 70 void skiagm::SimpleGM::onDraw(SkCanvas* canvas) { |
| 71 fDrawProc(canvas); |
| 72 } |
| 73 |
| 74 SkISize skiagm::SimpleGM::onISize() { |
| 75 return fSize; |
| 76 } |
| 77 |
| 78 SkString skiagm::SimpleGM::onShortName() { |
| 79 return fName; |
| 80 } |
OLD | NEW |