diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-11 15:06:32 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-11 15:06:32 +0000 |
commit | 3e97b6fa38039487f98d84deb8e63e21617a975d (patch) | |
tree | 384a6b9b3723aa6d7b735bd2e4971ca9411135b2 /ui/views/examples/text_example.cc | |
parent | b7a2c78f2f398d676cab96035c836c9af723d1dd (diff) | |
download | chromium_src-3e97b6fa38039487f98d84deb8e63e21617a975d.zip chromium_src-3e97b6fa38039487f98d84deb8e63e21617a975d.tar.gz chromium_src-3e97b6fa38039487f98d84deb8e63e21617a975d.tar.bz2 |
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
Diffstat (limited to 'ui/views/examples/text_example.cc')
-rw-r--r-- | ui/views/examples/text_example.cc | 12 |
1 files changed, 6 insertions, 6 deletions
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_); |