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

Side by Side Diff: ui/gfx/compositor/test_compositor_host_linux.cc

Issue 8222028: Use WebKit compositor in ui::Layer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/compositor/test_compositor.cc ('k') | ui/gfx/compositor/test_suite.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/compositor/test_compositor_host.h" 5 #include "ui/gfx/compositor/test_compositor_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/base/x/x11_util.h" 10 #include "ui/base/x/x11_util.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 break; 83 break;
84 } 84 }
85 compositor_ = ui::Compositor::Create(this, window_, bounds_.size()); 85 compositor_ = ui::Compositor::Create(this, window_, bounds_.size());
86 } 86 }
87 87
88 ui::Compositor* TestCompositorHostLinux::GetCompositor() { 88 ui::Compositor* TestCompositorHostLinux::GetCompositor() {
89 return compositor_; 89 return compositor_;
90 } 90 }
91 91
92 void TestCompositorHostLinux::ScheduleDraw() { 92 void TestCompositorHostLinux::ScheduleDraw() {
93 compositor_->Draw(false); 93 if (compositor_)
94 compositor_->Draw(false);
94 } 95 }
95 96
96 #if defined(TOUCH_UI) || defined(USE_AURA) 97 #if defined(TOUCH_UI) || defined(USE_AURA)
97 base::MessagePumpDispatcher::DispatchStatus TestCompositorHostLinux::Dispatch( 98 base::MessagePumpDispatcher::DispatchStatus TestCompositorHostLinux::Dispatch(
98 XEvent* xev) { 99 XEvent* xev) {
99 return MessagePumpDispatcher::EVENT_IGNORED; 100 return MessagePumpDispatcher::EVENT_IGNORED;
100 } 101 }
101 #elif defined(TOOLKIT_USES_GTK) 102 #elif defined(TOOLKIT_USES_GTK)
102 bool TestCompositorHostLinux::Dispatch(GdkEvent*) { 103 bool TestCompositorHostLinux::Dispatch(GdkEvent*) {
103 return false; 104 return false;
104 } 105 }
105 #endif 106 #endif
106 107
107 // static 108 // static
108 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) { 109 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) {
109 return new TestCompositorHostLinux(bounds); 110 return new TestCompositorHostLinux(bounds);
110 } 111 }
111 112
112 } // namespace ui 113 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gfx/compositor/test_compositor.cc ('k') | ui/gfx/compositor/test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698