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

Unified Diff: ui/gfx/canvas_skia.cc

Issue 2654853002: Remove gfx::Canvas::DrawStringRectWithHalo. (Closed)
Patch Set: Created 3 years, 11 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
Index: ui/gfx/canvas_skia.cc
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc
index 3fd8f366dab99e76cbee5ec807a8b5c710a890fe..cbde4358935684a35df924b38e6fb1c169c56ec8 100644
--- a/ui/gfx/canvas_skia.cc
+++ b/ui/gfx/canvas_skia.cc
@@ -157,7 +157,6 @@ void Canvas::DrawStringRectWithFlags(const base::string16& text,
Rect rect(text_bounds);
std::unique_ptr<RenderText> render_text(RenderText::CreateInstance());
- render_text->set_halo_effect(!!(flags & HALO_EFFECT));
if (flags & MULTI_LINE) {
WordWrapBehavior wrap_behavior = IGNORE_LONG_WORDS;
@@ -228,24 +227,6 @@ void Canvas::DrawStringRectWithFlags(const base::string16& text,
canvas_->restore();
}
-void Canvas::DrawStringRectWithHalo(const base::string16& text,
- const FontList& font_list,
- SkColor text_color,
- SkColor halo_color_in,
- const Rect& display_rect,
- int flags) {
- // Some callers will have semitransparent halo colors, which we don't handle
- // (since the resulting image can have 1-bit transparency only).
- SkColor halo_color = SkColorSetA(halo_color_in, 0xFF);
-
- // Draw the halo.
- DrawStringRectWithFlags(text, font_list, halo_color, display_rect,
- flags | HALO_EFFECT | NO_SUBPIXEL_RENDERING);
- // Draw the text.
- DrawStringRectWithFlags(text, font_list, text_color, display_rect,
- flags | NO_SUBPIXEL_RENDERING);
-}
-
void Canvas::DrawFadedString(const base::string16& text,
const FontList& font_list,
SkColor color,

Powered by Google App Engine
This is Rietveld 408576698