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

Side by Side Diff: tools/Checkerboard.h

Issue 834303005: Factor out checkerboard function in gm and sampleapp into tools. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rename to sk_tools::DrawCheckerboard Created 5 years, 10 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 | « samplecode/SampleUnpremul.cpp ('k') | tools/Checkerboard.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7 #ifndef Checkerboard_DEFINED
8 #define Checkerboard_DEFINED
9
10 #include "SkColor.h"
11
12 class SkCanvas;
13 class SkShader;
14
15 namespace sk_tools {
16
17 /** Returns a newly created CheckerboardShader. */
18 SkShader* CreateCheckerboardShader(SkColor c1, SkColor c2, int size);
19
20 /** Draw a checkerboard pattern in the current canvas, restricted to
21 the current clip. */
22 void DrawCheckerboard(SkCanvas* canvas,
23 SkColor color1,
24 SkColor color2,
25 int size);
26
27 /** A default checkerboard. */
28 inline void DrawCheckerboard(SkCanvas* canvas) {
29 sk_tools::DrawCheckerboard(canvas, 0xFF999999, 0xFF666666, 8);
30 }
31
32 } // namespace sk_tools
33
34 #endif // Checkerboard_DEFINED
OLDNEW
« no previous file with comments | « samplecode/SampleUnpremul.cpp ('k') | tools/Checkerboard.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698