summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 23:48:23 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-22 23:48:23 +0000
commitf35d5e8112599c578f0e5891028bd43553f4e0bd (patch)
tree4f16a2cd945f4477ca215daaba465907f3232cf6 /views/widget
parent601e664f992c48f8a4009cc2d8843075a5e29192 (diff)
downloadchromium_src-f35d5e8112599c578f0e5891028bd43553f4e0bd.zip
chromium_src-f35d5e8112599c578f0e5891028bd43553f4e0bd.tar.gz
chromium_src-f35d5e8112599c578f0e5891028bd43553f4e0bd.tar.bz2
Canvas refactoring part 1.
- Introduce a new Canvas2 interface. This will become the way that everyone talks to Canvas. It is populated primarily with the cross-platform methods from Canvas. - Make Canvas implement this interface. - Hook it up to the Windows RootView. Review URL: http://codereview.chromium.org/2866010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50543 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/root_view_win.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/views/widget/root_view_win.cc b/views/widget/root_view_win.cc
index 9535fd8..49717e1 100644
--- a/views/widget/root_view_win.cc
+++ b/views/widget/root_view_win.cc
@@ -24,12 +24,12 @@ void RootView::OnPaint(HWND hwnd) {
RECT win_version = original_dirty_region.ToRECT();
InvalidateRect(hwnd, &win_version, FALSE);
}
- gfx::CanvasPaint canvas(hwnd);
- if (!canvas.isEmpty()) {
- const PAINTSTRUCT& ps = canvas.paintStruct();
- SchedulePaint(gfx::Rect(ps.rcPaint), false);
+ scoped_ptr<gfx::CanvasPaint2> canvas(
+ gfx::CanvasPaint2::CreateCanvasPaint(hwnd));
+ if (!canvas->IsValid()) {
+ SchedulePaint(canvas->GetInvalidRect(), false);
if (NeedsPainting(false))
- ProcessPaint(&canvas);
+ ProcessPaint(canvas->AsCanvas2()->AsCanvas());
}
}