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

Unified Diff: tools/sk_tool_utils.h

Issue 1320673011: Minor code cleanup (left over from prior CL) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/xfermodeimagefilter.cpp ('k') | tools/sk_tool_utils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sk_tool_utils.h
diff --git a/tools/sk_tool_utils.h b/tools/sk_tool_utils.h
index 2f70090e491d9441b1423f0445494a3f11c47dc8..b20c60ba7632d9ed98f6f6cdd84f47e06ac4c99f 100644
--- a/tools/sk_tool_utils.h
+++ b/tools/sk_tool_utils.h
@@ -86,7 +86,7 @@ namespace sk_tool_utils {
void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkAlphaType);
// private to sk_tool_utils
- SkTypeface* create_font(const char* name, SkTypeface::Style );
+ SkTypeface* create_font(const char* name, SkTypeface::Style);
/** Returns a newly created CheckerboardShader. */
SkShader* create_checkerboard_shader(SkColor c1, SkColor c2, int size);
@@ -96,13 +96,21 @@ namespace sk_tool_utils {
void draw_checkerboard(SkCanvas* canvas,
SkColor color1,
SkColor color2,
- int size);
+ int checkSize);
+
+ /** Make it easier to create a bitmap-based checkerboard */
+ SkBitmap create_checkerboard_bitmap(int w, int h,
+ SkColor c1, SkColor c2,
+ int checkSize);
/** A default checkerboard. */
inline void draw_checkerboard(SkCanvas* canvas) {
sk_tool_utils::draw_checkerboard(canvas, 0xFF999999, 0xFF666666, 8);
}
+ SkBitmap create_string_bitmap(int w, int h, SkColor c, int x, int y,
+ int textSize, const char* str);
+
// Encodes to PNG, unless there is already encoded data, in which case that gets
// used.
class PngPixelSerializer : public SkPixelSerializer {
« no previous file with comments | « gm/xfermodeimagefilter.cpp ('k') | tools/sk_tool_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698