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

Side by Side Diff: tools/sk_tool_utils.h

Issue 1248703004: make color emoji gm portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
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
11 #include "SkColor.h" 11 #include "SkColor.h"
12 #include "SkImageEncoder.h" 12 #include "SkImageEncoder.h"
13 #include "SkImageInfo.h" 13 #include "SkImageInfo.h"
14 #include "SkPixelSerializer.h" 14 #include "SkPixelSerializer.h"
15 #include "SkTypeface.h" 15 #include "SkTypeface.h"
16 16
17 class SkBitmap; 17 class SkBitmap;
18 class SkCanvas; 18 class SkCanvas;
19 class SkPaint; 19 class SkPaint;
20 class SkShader; 20 class SkShader;
21 class SkTestFont; 21 class SkTestFont;
22 class SkTextBlobBuilder; 22 class SkTextBlobBuilder;
23 23
24 namespace sk_tool_utils { 24 namespace sk_tool_utils {
25 25
26 const char* colortype_name(SkColorType); 26 const char* colortype_name(SkColorType);
27 SkColor color_to_565(SkColor color); 27 SkColor color_to_565(SkColor color);
28 const char* platform_os_emoji();
28 const char* platform_os_name(); 29 const char* platform_os_name();
29 const char* platform_extra_config(const char* config); 30 const char* platform_extra_config(const char* config);
30 31
31 /** 32 /**
32 * Sets the paint to use a platform-independent text renderer if FLAGS_porta bleFonts is set. 33 * Sets the paint to use a platform-independent text renderer if FLAGS_porta bleFonts is set.
33 * FIXME: will become obsolete as GMs migrate to set portable typeface alway s. 34 * FIXME: will become obsolete as GMs migrate to set portable typeface alway s.
34 */ 35 */
35 void set_portable_typeface(SkPaint* paint, const char* name = NULL, 36 void set_portable_typeface(SkPaint* paint, const char* name = NULL,
36 SkTypeface::Style style = SkTypeface::kNormal); 37 SkTypeface::Style style = SkTypeface::kNormal);
37 void set_portable_typeface_always(SkPaint* paint, const char* name = NULL, 38 void set_portable_typeface_always(SkPaint* paint, const char* name = NULL,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 80 }
80 }; 81 };
81 82
82 // A helper for inserting a drawtext call into a SkTextBlobBuilder 83 // A helper for inserting a drawtext call into a SkTextBlobBuilder
83 void add_to_text_blob(SkTextBlobBuilder* builder, const char* text, const Sk Paint& origPaint, 84 void add_to_text_blob(SkTextBlobBuilder* builder, const char* text, const Sk Paint& origPaint,
84 SkScalar x, SkScalar y); 85 SkScalar x, SkScalar y);
85 86
86 } // namespace sk_tool_utils 87 } // namespace sk_tool_utils
87 88
88 #endif // sk_tool_utils_DEFINED 89 #endif // sk_tool_utils_DEFINED
OLDNEW
« gm/dftext.cpp ('K') | « gm/mixedtextblobs.cpp ('k') | tools/sk_tool_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698