From 3e97b6fa38039487f98d84deb8e63e21617a975d Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Sun, 11 Mar 2012 15:06:32 +0000 Subject: ui/gfx: Get rid of CanvasSkia::AsCanvasSkia() function. BUG=116572 R=asvitkine@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9662034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126074 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/views/examples/text_example.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ui/views/examples/text_example.cc') diff --git a/ui/views/examples/text_example.cc b/ui/views/examples/text_example.cc index ae91cda..42b40a9 100644 --- a/ui/views/examples/text_example.cc +++ b/ui/views/examples/text_example.cc @@ -103,18 +103,18 @@ class TextExample::TextExampleView : public View { virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { #if defined(OS_WIN) if (fade_) { - gfx::Rect rect(0, 0, width(), height()); size_t characters_to_truncate_from_head = - gfx::CanvasSkia::TruncateFadeHeadAndTail ? 10 : 0; - canvas->AsCanvasSkia()->DrawFadeTruncatingString(text_, fade_mode_, - characters_to_truncate_from_head, font_, SK_ColorDKGRAY, rect); + gfx::Canvas::TruncateFadeHeadAndTail ? 10 : 0; + canvas->DrawFadeTruncatingString(text_, fade_mode_, + characters_to_truncate_from_head, font_, SK_ColorDKGRAY, + GetLocalBounds()); return; } #endif if (halo_) { - canvas->AsCanvasSkia()->DrawStringWithHalo(text_, font_, SK_ColorDKGRAY, - SK_ColorWHITE, 0, 0, width(), height(), text_flags_); + canvas->DrawStringWithHalo(text_, font_, SK_ColorDKGRAY, SK_ColorWHITE, 0, + 0, width(), height(), text_flags_); } else { canvas->DrawStringInt(text_, font_, SK_ColorDKGRAY, 0, 0, width(), height(), text_flags_); -- cgit v1.1