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 "SkGradientShader.h" | 9 #include "SkGradientShader.h" |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 | 34 |
35 const char* filterLevelToString() { | 35 const char* filterLevelToString() { |
36 static const char *filterLevelNames[] = { | 36 static const char *filterLevelNames[] = { |
37 "none", "low", "medium", "high" | 37 "none", "low", "medium", "high" |
38 }; | 38 }; |
39 return filterLevelNames[fFilterLevel]; | 39 return filterLevelNames[fFilterLevel]; |
40 } | 40 } |
41 | 41 |
42 protected: | 42 protected: |
| 43 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 44 if (SkPaint::kHigh_FilterLevel != fFilterLevel) { |
| 45 return kSkipTiled_Flag; |
| 46 } |
| 47 return 0; |
| 48 } |
| 49 |
43 virtual SkString onShortName() SK_OVERRIDE { | 50 virtual SkString onShortName() SK_OVERRIDE { |
44 return fName; | 51 return fName; |
45 } | 52 } |
46 | 53 |
47 virtual SkISize onISize() SK_OVERRIDE { | 54 virtual SkISize onISize() SK_OVERRIDE { |
48 make_bitmap_wrapper(); | 55 make_bitmap_wrapper(); |
49 return SkISize::Make(4 * fBM.width(), fBM.height()); | 56 return SkISize::Make(4 * fBM.width(), fBM.height()); |
50 } | 57 } |
51 | 58 |
52 void make_bitmap_wrapper() { | 59 void make_bitmap_wrapper() { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kMedium_Filt
erLevel); ) | 206 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kMedium_Filt
erLevel); ) |
200 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kMedium_
FilterLevel); ) | 207 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kMedium_
FilterLevel); ) |
201 | 208 |
202 DEF_GM( return new DownsampleBitmapTextGM(72, SkPaint::kLow_FilterLevel); ) | 209 DEF_GM( return new DownsampleBitmapTextGM(72, SkPaint::kLow_FilterLevel); ) |
203 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kLow_FilterL
evel); ) | 210 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kLow_FilterL
evel); ) |
204 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kLow_Fil
terLevel); ) | 211 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kLow_Fil
terLevel); ) |
205 | 212 |
206 DEF_GM( return new DownsampleBitmapTextGM(72, SkPaint::kNone_FilterLevel); ) | 213 DEF_GM( return new DownsampleBitmapTextGM(72, SkPaint::kNone_FilterLevel); ) |
207 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kNone_Filter
Level); ) | 214 DEF_GM( return new DownsampleBitmapCheckerboardGM(512,256, SkPaint::kNone_Filter
Level); ) |
208 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kNone_Fi
lterLevel); ) | 215 DEF_GM( return new DownsampleBitmapImageGM("mandrill_512.png", SkPaint::kNone_Fi
lterLevel); ) |
OLD | NEW |