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

Unified Diff: ui/gfx/compositor/test_compositor_host_win.cc

Issue 7845033: Rework View Layer Draw() to use the Layer::DrawTree() method and the LayerDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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/compositor/layer_unittest.cc ('k') | views/layer_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/test_compositor_host_win.cc
===================================================================
--- ui/gfx/compositor/test_compositor_host_win.cc (revision 100773)
+++ ui/gfx/compositor/test_compositor_host_win.cc (working copy)
@@ -11,13 +11,14 @@
namespace ui {
class TestCompositorHostWin : public TestCompositorHost,
- public ui::WindowImpl {
+ public WindowImpl,
+ public CompositorDelegate {
public:
TestCompositorHostWin(const gfx::Rect& bounds,
TestCompositorHostDelegate* delegate)
: delegate_(delegate) {
Init(NULL, bounds);
- compositor_ = ui::Compositor::Create(hwnd(), GetSize());
+ compositor_ = ui::Compositor::Create(this, hwnd(), GetSize());
}
virtual ~TestCompositorHostWin() {
@@ -39,6 +40,13 @@
return compositor_;
}
+ // Overridden from CompositorDelegate:
+ virtual void ScheduleCompositorPaint() OVERRIDE {
+ RECT rect;
+ ::GetClientRect(hwnd(), &rect);
+ InvalidateRect(hwnd(), &rect, FALSE);
+ }
+
private:
BEGIN_MSG_MAP_EX(TestCompositorHostWin)
MSG_WM_PAINT(OnPaint)
« no previous file with comments | « ui/gfx/compositor/layer_unittest.cc ('k') | views/layer_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698