| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class BitmapShaderGM : public GM { | 43 class BitmapShaderGM : public GM { |
| 44 public: | 44 public: |
| 45 | 45 |
| 46 BitmapShaderGM() { | 46 BitmapShaderGM() { |
| 47 this->setBGColor(SK_ColorGRAY); | 47 this->setBGColor(SK_ColorGRAY); |
| 48 draw_bm(&fBitmap); | 48 draw_bm(&fBitmap); |
| 49 draw_mask(&fMask); | 49 draw_mask(&fMask); |
| 50 } | 50 } |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 virtual uint32_t onGetFlags() const SK_OVERRIDE { | |
| 54 return kSkipTiled_Flag; | |
| 55 } | |
| 56 | |
| 57 virtual SkString onShortName() { | 53 virtual SkString onShortName() { |
| 58 return SkString("bitmapshaders"); | 54 return SkString("bitmapshaders"); |
| 59 } | 55 } |
| 60 | 56 |
| 61 virtual SkISize onISize() { | 57 virtual SkISize onISize() { |
| 62 return SkISize::Make(150, 100); | 58 return SkISize::Make(150, 100); |
| 63 } | 59 } |
| 64 | 60 |
| 65 virtual void onDraw(SkCanvas* canvas) { | 61 virtual void onDraw(SkCanvas* canvas) { |
| 66 SkPaint paint; | 62 SkPaint paint; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 110 |
| 115 typedef GM INHERITED; | 111 typedef GM INHERITED; |
| 116 }; | 112 }; |
| 117 | 113 |
| 118 ////////////////////////////////////////////////////////////////////////////// | 114 ////////////////////////////////////////////////////////////////////////////// |
| 119 | 115 |
| 120 static GM* MyFactory(void*) { return new BitmapShaderGM; } | 116 static GM* MyFactory(void*) { return new BitmapShaderGM; } |
| 121 static GMRegistry reg(MyFactory); | 117 static GMRegistry reg(MyFactory); |
| 122 | 118 |
| 123 } | 119 } |
| OLD | NEW |