Index: ui/gfx/render_text.h |
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h |
index 5a1825351bdf5c8bc97b7b754e1d3be3f7c2b7ea..6b5ec5adc2437f29ed9e574ac29cce8ac08a782e 100644 |
--- a/ui/gfx/render_text.h |
+++ b/ui/gfx/render_text.h |
@@ -52,7 +52,7 @@ class SkiaTextRenderer { |
void SetDrawLooper(SkDrawLooper* draw_looper); |
void SetFontRenderParams(const FontRenderParams& params, |
- bool background_is_transparent); |
+ bool subpixel_rendering_enabled); |
void SetTypeface(SkTypeface* typeface); |
void SetTextSize(SkScalar size); |
void SetFontFamilyWithStyle(const std::string& family, int font_style); |
@@ -181,7 +181,7 @@ skia::RefPtr<SkTypeface> CreateSkiaTypeface(const std::string& family, |
// Applies the given FontRenderParams to a Skia |paint|. |
void ApplyRenderParams(const FontRenderParams& params, |
- bool background_is_transparent, |
+ bool subpixel_rendering_enabled, |
SkPaint* paint); |
} // namespace internal |
@@ -273,9 +273,11 @@ class GFX_EXPORT RenderText { |
const Rect& display_rect() const { return display_rect_; } |
void SetDisplayRect(const Rect& r); |
- bool background_is_transparent() const { return background_is_transparent_; } |
- void set_background_is_transparent(bool transparent) { |
- background_is_transparent_ = transparent; |
+ bool subpixel_rendering_enabled() const { |
+ return subpixel_rendering_enabled_; |
+ } |
+ void set_subpixel_rendering_enabled(bool enabled) { |
+ subpixel_rendering_enabled_ = enabled; |
} |
const SelectionModel& selection_model() const { return selection_model_; } |
@@ -732,8 +734,9 @@ class GFX_EXPORT RenderText { |
// |display_rect_| as the width cap. |
bool multiline_; |
- // Is the background transparent (either partially or fully)? |
- bool background_is_transparent_; |
+ // Set to false to suppress subpixel rendering due to non-font reasons (such |
msw
2015/02/19 00:56:25
nit: "(eg. if the background is transparent)"
Jun Mukai
2015/02/19 02:07:48
Done.
|
+ // like background is transparent). The default value is true. |
+ bool subpixel_rendering_enabled_; |
// The local display area for rendering the text. |
Rect display_rect_; |