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

Side by Side Diff: ui/compositor/test/test_compositor_host_x11.cc

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/test/test_compositor_host_win.cc ('k') | ui/views/cocoa/bridged_native_widget.mm » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 CopyFromParent, // visual 66 CopyFromParent, // visual
67 CWEventMask | CWOverrideRedirect, &swa); 67 CWEventMask | CWOverrideRedirect, &swa);
68 XMapWindow(display, window_); 68 XMapWindow(display, window_);
69 69
70 while (1) { 70 while (1) {
71 XEvent event; 71 XEvent event;
72 XNextEvent(display, &event); 72 XNextEvent(display, &event);
73 if (event.type == MapNotify && event.xmap.window == window_) 73 if (event.type == MapNotify && event.xmap.window == window_)
74 break; 74 break;
75 } 75 }
76 compositor_.SetAcceleratedWidgetAndStartCompositor(window_); 76 compositor_.SetAcceleratedWidget(window_);
77 compositor_.SetScaleAndSize(1.0f, bounds_.size()); 77 compositor_.SetScaleAndSize(1.0f, bounds_.size());
78 } 78 }
79 79
80 ui::Compositor* TestCompositorHostX11::GetCompositor() { 80 ui::Compositor* TestCompositorHostX11::GetCompositor() {
81 return &compositor_; 81 return &compositor_;
82 } 82 }
83 83
84 // static 84 // static
85 TestCompositorHost* TestCompositorHost::Create( 85 TestCompositorHost* TestCompositorHost::Create(
86 const gfx::Rect& bounds, 86 const gfx::Rect& bounds,
87 ui::ContextFactory* context_factory) { 87 ui::ContextFactory* context_factory) {
88 return new TestCompositorHostX11(bounds, context_factory); 88 return new TestCompositorHostX11(bounds, context_factory);
89 } 89 }
90 90
91 } // namespace ui 91 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_compositor_host_win.cc ('k') | ui/views/cocoa/bridged_native_widget.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698