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

Unified Diff: ui/gfx/canvas_skia.cc

Issue 2616963002: Remove unused Canvas::DrawStringRectWithShadows(). (Closed)
Patch Set: more iwyu 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
« no previous file with comments | « ui/gfx/canvas_notimplemented.cc ('k') | ui/gfx/test/data/compositor/string_with_shadows.png » ('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 7aa114b1b6cada110a32344cd2666a181fe1b644..3fd8f366dab99e76cbee5ec807a8b5c710a890fe 100644
--- a/ui/gfx/canvas_skia.cc
+++ b/ui/gfx/canvas_skia.cc
@@ -143,26 +143,20 @@ void Canvas::SizeStringFloat(const base::string16& text,
}
}
-void Canvas::DrawStringRectWithShadows(const base::string16& text,
- const FontList& font_list,
- SkColor color,
- const Rect& text_bounds,
- int line_height,
- int flags,
- const ShadowValues& shadows) {
+void Canvas::DrawStringRectWithFlags(const base::string16& text,
+ const FontList& font_list,
+ SkColor color,
+ const Rect& text_bounds,
+ int flags) {
if (!IntersectsClipRect(RectToSkRect(text_bounds)))
return;
- Rect clip_rect(text_bounds);
- clip_rect.Inset(ShadowValue::GetMargin(shadows));
-
canvas_->save();
- ClipRect(clip_rect);
+ ClipRect(text_bounds);
Rect rect(text_bounds);
std::unique_ptr<RenderText> render_text(RenderText::CreateInstance());
- render_text->set_shadows(shadows);
render_text->set_halo_effect(!!(flags & HALO_EFFECT));
if (flags & MULTI_LINE) {
@@ -182,10 +176,7 @@ void Canvas::DrawStringRectWithShadows(const base::string16& text,
UpdateRenderText(rect, strings[i], font_list, flags, color,
render_text.get());
int line_padding = 0;
- if (line_height > 0)
- line_padding = line_height - render_text->GetStringSize().height();
- else
- line_height = render_text->GetStringSize().height();
+ const int line_height = render_text->GetStringSize().height();
// TODO(msw|asvitkine): Center Windows multi-line text: crbug.com/107357
#if !defined(OS_WIN)
« no previous file with comments | « ui/gfx/canvas_notimplemented.cc ('k') | ui/gfx/test/data/compositor/string_with_shadows.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698