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

Unified Diff: ui/gfx/canvas_skia.cc

Issue 2654853002: Remove gfx::Canvas::DrawStringRectWithHalo. (Closed)
Patch Set: fix test Created 3 years, 9 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 | « ui/gfx/canvas_notimplemented.cc ('k') | ui/gfx/render_text.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas_skia.cc
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc
index 7ee64d121d4d2c5ba2799b9f8a543f298d009ce5..916ff1caf1dacdad99b23397b8e0318463a42174 100644
--- a/ui/gfx/canvas_skia.cc
+++ b/ui/gfx/canvas_skia.cc
@@ -158,7 +158,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;
@@ -229,24 +228,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,
« no previous file with comments | « ui/gfx/canvas_notimplemented.cc ('k') | ui/gfx/render_text.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698