Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: tools/sk_tool_utils.h

Issue 877103002: sk_tool_utils::draw_checkerboard uses SkXfermode::kSrc_Mode to fix valgrind error. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/sk_tool_utils.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 26 matching lines...) Expand all
37 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkA lphaType); 37 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkA lphaType);
38 38
39 // private to sk_tool_utils 39 // private to sk_tool_utils
40 SkTypeface* create_font(const char* name, SkTypeface::Style ); 40 SkTypeface* create_font(const char* name, SkTypeface::Style );
41 SkTypeface* resource_font(const char* name, SkTypeface::Style ); 41 SkTypeface* resource_font(const char* name, SkTypeface::Style );
42 42
43 /** Returns a newly created CheckerboardShader. */ 43 /** Returns a newly created CheckerboardShader. */
44 SkShader* create_checkerboard_shader(SkColor c1, SkColor c2, int size); 44 SkShader* create_checkerboard_shader(SkColor c1, SkColor c2, int size);
45 45
46 /** Draw a checkerboard pattern in the current canvas, restricted to 46 /** Draw a checkerboard pattern in the current canvas, restricted to
47 the current clip. */ 47 the current clip, using SkXfermode::kSrc_Mode. */
48 void draw_checkerboard(SkCanvas* canvas, 48 void draw_checkerboard(SkCanvas* canvas,
49 SkColor color1, 49 SkColor color1,
50 SkColor color2, 50 SkColor color2,
51 int size); 51 int size);
52 52
53 /** A default checkerboard. */ 53 /** A default checkerboard. */
54 inline void draw_checkerboard(SkCanvas* canvas) { 54 inline void draw_checkerboard(SkCanvas* canvas) {
55 sk_tool_utils::draw_checkerboard(canvas, 0xFF999999, 0xFF666666, 8); 55 sk_tool_utils::draw_checkerboard(canvas, 0xFF999999, 0xFF666666, 8);
56 } 56 }
57 57
58 } // namespace sk_tool_utils 58 } // namespace sk_tool_utils
59 59
60 #endif // sk_tool_utils_DEFINED 60 #endif // sk_tool_utils_DEFINED
OLDNEW
« no previous file with comments | « no previous file | tools/sk_tool_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698