OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #ifndef sk_tool_utils_DEFINED | 8 #ifndef sk_tool_utils_DEFINED |
9 #define sk_tool_utils_DEFINED | 9 #define sk_tool_utils_DEFINED |
10 | 10 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 /** | 85 /** |
86 * Call canvas->writePixels() by using the pixels from bitmap, but with an
info that claims | 86 * Call canvas->writePixels() by using the pixels from bitmap, but with an
info that claims |
87 * the pixels are colorType + alphaType | 87 * the pixels are colorType + alphaType |
88 */ | 88 */ |
89 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkA
lphaType); | 89 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkA
lphaType); |
90 | 90 |
91 // private to sk_tool_utils | 91 // private to sk_tool_utils |
92 SkTypeface* create_font(const char* name, SkTypeface::Style); | 92 SkTypeface* create_font(const char* name, SkTypeface::Style); |
93 | 93 |
94 /** Returns a newly created CheckerboardShader. */ | 94 /** Returns a newly created CheckerboardShader. */ |
95 SkShader* create_checkerboard_shader(SkColor c1, SkColor c2, int size); | 95 sk_sp<SkShader> create_checkerboard_shader(SkColor c1, SkColor c2, int size)
; |
96 | 96 |
97 /** Draw a checkerboard pattern in the current canvas, restricted to | 97 /** Draw a checkerboard pattern in the current canvas, restricted to |
98 the current clip, using SkXfermode::kSrc_Mode. */ | 98 the current clip, using SkXfermode::kSrc_Mode. */ |
99 void draw_checkerboard(SkCanvas* canvas, | 99 void draw_checkerboard(SkCanvas* canvas, |
100 SkColor color1, | 100 SkColor color1, |
101 SkColor color2, | 101 SkColor color2, |
102 int checkSize); | 102 int checkSize); |
103 | 103 |
104 /** Make it easier to create a bitmap-based checkerboard */ | 104 /** Make it easier to create a bitmap-based checkerboard */ |
105 SkBitmap create_checkerboard_bitmap(int w, int h, | 105 SkBitmap create_checkerboard_bitmap(int w, int h, |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 int fID; | 216 int fID; |
217 int fOutputPos; | 217 int fOutputPos; |
218 bool fTempMark; | 218 bool fTempMark; |
219 | 219 |
220 SkTDArray<TopoTestNode*> fDependencies; | 220 SkTDArray<TopoTestNode*> fDependencies; |
221 }; | 221 }; |
222 | 222 |
223 } // namespace sk_tool_utils | 223 } // namespace sk_tool_utils |
224 | 224 |
225 #endif // sk_tool_utils_DEFINED | 225 #endif // sk_tool_utils_DEFINED |
OLD | NEW |