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

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

Issue 1373033004: aura: Defer OutputSurface creation until widget is available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « ui/compositor/layer_owner_unittest.cc ('k') | ui/compositor/test/test_compositor_host_ozone.cc » ('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) 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 window_ = [[NSWindow alloc] 126 window_ = [[NSWindow alloc]
127 initWithContentRect:NSMakeRect(bounds_.x(), 127 initWithContentRect:NSMakeRect(bounds_.x(),
128 bounds_.y(), 128 bounds_.y(),
129 bounds_.width(), 129 bounds_.width(),
130 bounds_.height()) 130 bounds_.height())
131 styleMask:NSBorderlessWindowMask 131 styleMask:NSBorderlessWindowMask
132 backing:NSBackingStoreBuffered 132 backing:NSBackingStoreBuffered
133 defer:NO]; 133 defer:NO];
134 base::scoped_nsobject<AcceleratedTestView> view( 134 base::scoped_nsobject<AcceleratedTestView> view(
135 [[AcceleratedTestView alloc] init]); 135 [[AcceleratedTestView alloc] init]);
136 compositor_.SetAcceleratedWidgetAndStartCompositor(view); 136 compositor_.SetAcceleratedWidget(view);
137 compositor_.SetScaleAndSize(1.0f, bounds_.size()); 137 compositor_.SetScaleAndSize(1.0f, bounds_.size());
138 [view setCompositor:&compositor_]; 138 [view setCompositor:&compositor_];
139 [window_ setContentView:view]; 139 [window_ setContentView:view];
140 [window_ orderFront:nil]; 140 [window_ orderFront:nil];
141 } 141 }
142 142
143 ui::Compositor* TestCompositorHostMac::GetCompositor() { 143 ui::Compositor* TestCompositorHostMac::GetCompositor() {
144 return &compositor_; 144 return &compositor_;
145 } 145 }
146 146
147 // static 147 // static
148 TestCompositorHost* TestCompositorHost::Create( 148 TestCompositorHost* TestCompositorHost::Create(
149 const gfx::Rect& bounds, 149 const gfx::Rect& bounds,
150 ui::ContextFactory* context_factory) { 150 ui::ContextFactory* context_factory) {
151 return new TestCompositorHostMac(bounds, context_factory); 151 return new TestCompositorHostMac(bounds, context_factory);
152 } 152 }
153 153
154 } // namespace ui 154 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer_owner_unittest.cc ('k') | ui/compositor/test/test_compositor_host_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698