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

Side by Side Diff: ui/compositor/test/test_compositor_host_mac.mm

Issue 13555004: Aura: Make compositor_unittests work with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Set the delegates. DCHECK not called if threaded. Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/compositor/test/test_compositor_host.h" 5 #include "ui/compositor/test/test_compositor_host.h"
6 6
7 #import <AppKit/NSApplication.h> 7 #import <AppKit/NSApplication.h>
8 #import <AppKit/NSOpenGL.h> 8 #import <AppKit/NSOpenGL.h>
9 #import <AppKit/NSView.h> 9 #import <AppKit/NSView.h>
10 #import <AppKit/NSWindow.h> 10 #import <AppKit/NSWindow.h>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 [view setCompositor:compositor_.get()]; 131 [view setCompositor:compositor_.get()];
132 [window_ setContentView:view]; 132 [window_ setContentView:view];
133 [window_ orderFront:nil]; 133 [window_ orderFront:nil];
134 } 134 }
135 135
136 ui::Compositor* TestCompositorHostMac::GetCompositor() { 136 ui::Compositor* TestCompositorHostMac::GetCompositor() {
137 return compositor_.get(); 137 return compositor_.get();
138 } 138 }
139 139
140 void TestCompositorHostMac::ScheduleDraw() { 140 void TestCompositorHostMac::ScheduleDraw() {
141 DCHECK(!ui::Compositor::WasInitializedWithThread());
141 if (!compositor_.get()) 142 if (!compositor_.get())
142 return; 143 return;
143 144
144 // Force display now. 145 // Force display now.
145 [window_ display]; 146 [window_ display];
146 } 147 }
147 148
148 // static 149 // static
149 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) { 150 TestCompositorHost* TestCompositorHost::Create(const gfx::Rect& bounds) {
150 return new TestCompositorHostMac(bounds); 151 return new TestCompositorHostMac(bounds);
151 } 152 }
152 153
153 } // namespace ui 154 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_compositor_host_linux.cc ('k') | ui/compositor/test/test_compositor_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698