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

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

Issue 1391893003: NOT FOR REVIEW: Aura on Android (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
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_.reset(new ui::Compositor(window_, 76 compositor_.reset(new ui::Compositor(context_factory_,
77 context_factory_,
78 base::ThreadTaskRunnerHandle::Get())); 77 base::ThreadTaskRunnerHandle::Get()));
78 compositor_->OnAcceleratedWidgetAvailable(window_);
79 compositor_->SetScaleAndSize(1.0f, bounds_.size()); 79 compositor_->SetScaleAndSize(1.0f, bounds_.size());
80 } 80 }
81 81
82 ui::Compositor* TestCompositorHostX11::GetCompositor() { 82 ui::Compositor* TestCompositorHostX11::GetCompositor() {
83 return compositor_.get(); 83 return compositor_.get();
84 } 84 }
85 85
86 // static 86 // static
87 TestCompositorHost* TestCompositorHost::Create( 87 TestCompositorHost* TestCompositorHost::Create(
88 const gfx::Rect& bounds, 88 const gfx::Rect& bounds,
89 ui::ContextFactory* context_factory) { 89 ui::ContextFactory* context_factory) {
90 return new TestCompositorHostX11(bounds, context_factory); 90 return new TestCompositorHostX11(bounds, context_factory);
91 } 91 }
92 92
93 } // namespace ui 93 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698