OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBitmapDevice.h" | 9 #include "SkBitmapDevice.h" |
10 #include "SkBitmapSource.h" | 10 #include "SkBitmapSource.h" |
11 #include "SkColor.h" | 11 #include "SkColor.h" |
12 #include "SkMatrixImageFilter.h" | 12 #include "SkMatrixImageFilter.h" |
13 #include "SkRefCnt.h" | 13 #include "SkRefCnt.h" |
14 | 14 |
15 namespace skiagm { | 15 namespace skiagm { |
16 | 16 |
17 class ResizeGM : public GM { | 17 class ResizeGM : public GM { |
18 public: | 18 public: |
19 ResizeGM() { | 19 ResizeGM() { |
20 this->setBGColor(0x00000000); | 20 this->setBGColor(0x00000000); |
21 } | 21 } |
22 | 22 |
23 protected: | 23 protected: |
| 24 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 25 return kSkipTiled_Flag; |
| 26 } |
| 27 |
24 virtual SkString onShortName() { | 28 virtual SkString onShortName() { |
25 return SkString("resizeimagefilter"); | 29 return SkString("resizeimagefilter"); |
26 } | 30 } |
27 | 31 |
28 void draw(SkCanvas* canvas, | 32 void draw(SkCanvas* canvas, |
29 const SkRect& rect, | 33 const SkRect& rect, |
30 const SkSize& deviceSize, | 34 const SkSize& deviceSize, |
31 SkPaint::FilterLevel filterLevel, | 35 SkPaint::FilterLevel filterLevel, |
32 SkImageFilter* input = NULL) { | 36 SkImageFilter* input = NULL) { |
33 SkRect dstRect; | 37 SkRect dstRect; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 private: | 118 private: |
115 typedef GM INHERITED; | 119 typedef GM INHERITED; |
116 }; | 120 }; |
117 | 121 |
118 ////////////////////////////////////////////////////////////////////////////// | 122 ////////////////////////////////////////////////////////////////////////////// |
119 | 123 |
120 static GM* MyFactory(void*) { return new ResizeGM; } | 124 static GM* MyFactory(void*) { return new ResizeGM; } |
121 static GMRegistry reg(MyFactory); | 125 static GMRegistry reg(MyFactory); |
122 | 126 |
123 } | 127 } |
OLD | NEW |