OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "gm.h" | 8 #include "gm.h" |
9 | 9 |
10 namespace skiagm { | 10 namespace skiagm { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 make_bitmap(quarterWidth, quarterHeight, &origBitmap); | 52 make_bitmap(quarterWidth, quarterHeight, &origBitmap); |
53 } | 53 } |
54 | 54 |
55 public: | 55 public: |
56 BitmapScrollGM() { | 56 BitmapScrollGM() { |
57 fInited = false; | 57 fInited = false; |
58 this->setBGColor(0xFFDDDDDD); | 58 this->setBGColor(0xFFDDDDDD); |
59 } | 59 } |
60 | 60 |
61 protected: | 61 protected: |
| 62 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 63 return kSkipTiled_Flag; |
| 64 } |
| 65 |
62 virtual SkString onShortName() { | 66 virtual SkString onShortName() { |
63 return SkString("bitmapscroll"); | 67 return SkString("bitmapscroll"); |
64 } | 68 } |
65 | 69 |
66 virtual SkISize onISize() { | 70 virtual SkISize onISize() { |
67 return make_isize(800, 600); | 71 return make_isize(800, 600); |
68 } | 72 } |
69 | 73 |
70 virtual void onDraw(SkCanvas* canvas) { | 74 virtual void onDraw(SkCanvas* canvas) { |
71 this->init(); | 75 this->init(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 static const int quarterHeight = 14; | 149 static const int quarterHeight = 14; |
146 SkBitmap origBitmap; | 150 SkBitmap origBitmap; |
147 }; | 151 }; |
148 | 152 |
149 ////////////////////////////////////////////////////////////////////////////// | 153 ////////////////////////////////////////////////////////////////////////////// |
150 | 154 |
151 static GM* MyFactory(void*) { return new BitmapScrollGM; } | 155 static GM* MyFactory(void*) { return new BitmapScrollGM; } |
152 static GMRegistry reg(MyFactory); | 156 static GMRegistry reg(MyFactory); |
153 | 157 |
154 } | 158 } |
OLD | NEW |