OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #include "SkShader.h" | 10 #include "SkShader.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 colorBmp.eraseColor(sk_tool_utils::color_to_565(0xFF2000FF)); | 32 colorBmp.eraseColor(sk_tool_utils::color_to_565(0xFF2000FF)); |
33 canvas.drawBitmap(colorBmp, 20, 20); | 33 canvas.drawBitmap(colorBmp, 20, 20); |
34 } | 34 } |
35 | 35 |
36 SkString onShortName() override { return SkString("bmp_filter_quality_repeat
"); } | 36 SkString onShortName() override { return SkString("bmp_filter_quality_repeat
"); } |
37 | 37 |
38 SkISize onISize() override { return SkISize::Make(1000, 235); } | 38 SkISize onISize() override { return SkISize::Make(1000, 235); } |
39 | 39 |
40 void onDraw(SkCanvas* canvas) override { | 40 void onDraw(SkCanvas* canvas) override { |
41 | 41 |
42 static const struct { | 42 static const struct { |
43 SkFilterQuality fQuality; | 43 SkFilterQuality fQuality; |
44 const char* fName; | 44 const char* fName; |
45 } kQualities[] = { | 45 } kQualities[] = { |
46 {kNone_SkFilterQuality, "none"}, | 46 {kNone_SkFilterQuality, "none"}, |
47 {kLow_SkFilterQuality, "low"}, | 47 {kLow_SkFilterQuality, "low"}, |
48 {kMedium_SkFilterQuality, "medium"}, | 48 {kMedium_SkFilterQuality, "medium"}, |
49 {kHigh_SkFilterQuality, "high"}, | 49 {kHigh_SkFilterQuality, "high"}, |
50 }; | 50 }; |
51 | 51 |
52 for (size_t q = 0; q < SK_ARRAY_COUNT(kQualities); ++q) { | 52 for (size_t q = 0; q < SK_ARRAY_COUNT(kQualities); ++q) { |
(...skipping 18 matching lines...) Expand all Loading... |
71 | 71 |
72 private: | 72 private: |
73 SkBitmap fBmp; | 73 SkBitmap fBmp; |
74 | 74 |
75 typedef skiagm::GM INHERITED; | 75 typedef skiagm::GM INHERITED; |
76 }; | 76 }; |
77 | 77 |
78 ////////////////////////////////////////////////////////////////////////////// | 78 ////////////////////////////////////////////////////////////////////////////// |
79 | 79 |
80 DEF_GM(return new BmpFilterQualityRepeat;) | 80 DEF_GM(return new BmpFilterQualityRepeat;) |
OLD | NEW |