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 "SkColorFilter.h" | 9 #include "SkColorFilter.h" |
10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 SkString onShortName() override { | 27 SkString onShortName() override { |
28 return SkString("skbug1719"); | 28 return SkString("skbug1719"); |
29 } | 29 } |
30 | 30 |
31 SkISize onISize() override { | 31 SkISize onISize() override { |
32 return SkISize::Make(300, 100); | 32 return SkISize::Make(300, 100); |
33 } | 33 } |
34 | 34 |
35 void onDrawBackground(SkCanvas* canvas) override { | 35 void onDrawBackground(SkCanvas* canvas) override { |
36 SkPaint bgPaint; | 36 SkPaint bgPaint; |
37 bgPaint.setColor(0xFF303030); | 37 bgPaint.setColor(sk_tool_utils::color_to_565(0xFF303030)); |
38 canvas->drawPaint(bgPaint); | 38 canvas->drawPaint(bgPaint); |
39 } | 39 } |
40 | 40 |
41 void onDraw(SkCanvas* canvas) override { | 41 void onDraw(SkCanvas* canvas) override { |
42 canvas->translate(SkIntToScalar(-800), SkIntToScalar(-650)); | 42 canvas->translate(SkIntToScalar(-800), SkIntToScalar(-650)); |
43 | 43 |
44 // The data is lifted from an SKP that exhibited the bug. | 44 // The data is lifted from an SKP that exhibited the bug. |
45 | 45 |
46 // This is a round rect. | 46 // This is a round rect. |
47 SkPath clipPath; | 47 SkPath clipPath; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 private: | 93 private: |
94 | 94 |
95 typedef GM INHERITED; | 95 typedef GM INHERITED; |
96 }; | 96 }; |
97 | 97 |
98 ////////////////////////////////////////////////////////////////////////////// | 98 ////////////////////////////////////////////////////////////////////////////// |
99 | 99 |
100 DEF_GM(return new SkBug1719GM;) | 100 DEF_GM(return new SkBug1719GM;) |
101 | 101 |
102 } | 102 } |
OLD | NEW |