aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/sk_tool_utils.h
diff options
context:
space:
mode:
authorGravatar mboc <mboc@opera.com>2016-05-31 11:42:36 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-31 11:42:37 -0700
commitee6a9919a362e16c1d84a870ce867d1ad7b8a141 (patch)
tree971189523fe82821c82a936cafaefd59b76338f7 /tools/sk_tool_utils.h
parentbfa9275968d11d459b30a485cedcb55c7fecf9d7 (diff)
SkTypeface::MakeFromName to take SkFontStyle.
SkTypeface::MakeFromName currently takes SkTypeface::Style, which is quite limited. This starts the transition to this function taking SkFontStyle instead. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043002 TBR=reed He said it sounded like a good idea. Review-Url: https://codereview.chromium.org/1818043002
Diffstat (limited to 'tools/sk_tool_utils.h')
-rw-r--r--tools/sk_tool_utils.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/sk_tool_utils.h b/tools/sk_tool_utils.h
index a16c2a2f6e..c4d7c8a265 100644
--- a/tools/sk_tool_utils.h
+++ b/tools/sk_tool_utils.h
@@ -72,12 +72,12 @@ namespace sk_tool_utils {
* Sets the paint to use a platform-independent text renderer
*/
void set_portable_typeface(SkPaint* paint, const char* name = nullptr,
- SkTypeface::Style style = SkTypeface::kNormal);
+ SkFontStyle style = SkFontStyle());
/**
* Returns a platform-independent text renderer.
*/
- sk_sp<SkTypeface> create_portable_typeface(const char* name, SkTypeface::Style style);
+ sk_sp<SkTypeface> create_portable_typeface(const char* name, SkFontStyle style);
/** Call to clean up portable font references. */
void release_portable_typefaces();
@@ -89,7 +89,7 @@ namespace sk_tool_utils {
void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkAlphaType);
// private to sk_tool_utils
- sk_sp<SkTypeface> create_font(const char* name, SkTypeface::Style);
+ sk_sp<SkTypeface> create_font(const char* name, SkFontStyle);
/** Returns a newly created CheckerboardShader. */
sk_sp<SkShader> create_checkerboard_shader(SkColor c1, SkColor c2, int size);