diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-23 23:04:23 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-23 23:04:23 +0000 |
commit | 3024338797b31cd0e0357878bcd5b084e4a8af69 (patch) | |
tree | cf20d1d15f3907bb625a7cd1e465bbc47118821e /views/controls/table/table_view.cc | |
parent | 218f45da1c19e775cf72f46cc72f1c624927fd93 (diff) | |
download | chromium_src-3024338797b31cd0e0357878bcd5b084e4a8af69.zip chromium_src-3024338797b31cd0e0357878bcd5b084e4a8af69.tar.gz chromium_src-3024338797b31cd0e0357878bcd5b084e4a8af69.tar.bz2 |
Canvas refactoring part 2.
- Rename Canvas to CanvasSkia.
- Create a subclass Canvas that inherits from CanvasSkia for compatibility.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2862025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/table/table_view.cc')
-rw-r--r-- | views/controls/table/table_view.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/views/controls/table/table_view.cc b/views/controls/table/table_view.cc index 2363985..75425c2 100644 --- a/views/controls/table/table_view.cc +++ b/views/controls/table/table_view.cc @@ -834,7 +834,7 @@ HWND TableView::CreateNativeControl(HWND parent_container) { // We create 2 phony images because we are going to switch images at every // refresh in order to force a refresh of the icon area (somehow the clip // rect does not include the icon). - gfx::Canvas canvas(kImageSize, kImageSize, false); + gfx::CanvasSkia canvas(kImageSize, kImageSize, false); // Make the background completely transparent. canvas.drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); HICON empty_icon = @@ -1153,7 +1153,7 @@ void TableView::PaintAltText() { HDC dc = GetDC(GetNativeControlHWND()); gfx::Font font = GetAltTextFont(); gfx::Rect bounds = GetAltTextBounds(); - gfx::Canvas canvas(bounds.width(), bounds.height(), false); + gfx::CanvasSkia canvas(bounds.width(), bounds.height(), false); // Pad by 1 for halo. canvas.DrawStringWithHalo(alt_text_, font, SK_ColorDKGRAY, SK_ColorWHITE, 1, 1, bounds.width() - 2, bounds.height() - 2, @@ -1236,8 +1236,8 @@ LRESULT TableView::OnCustomDraw(NMLVCUSTOMDRAW* draw_info) { client_rect.top += content_offset_; // Make sure the region need to paint is visible. if (IntersectRect(&intersection, &icon_rect, &client_rect)) { - gfx::Canvas canvas(icon_rect.right - icon_rect.left, - icon_rect.bottom - icon_rect.top, false); + gfx::CanvasSkia canvas(icon_rect.right - icon_rect.left, + icon_rect.bottom - icon_rect.top, false); // It seems the state in nmcd.uItemState is not correct. // We'll retrieve it explicitly. |