OLD | NEW |
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 <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 const gfx::Rect& bounds, | 51 const gfx::Rect& bounds, |
52 ui::ContextFactory* context_factory, | 52 ui::ContextFactory* context_factory, |
53 ui::ContextFactoryPrivate* context_factory_private) | 53 ui::ContextFactoryPrivate* context_factory_private) |
54 : bounds_(bounds), | 54 : bounds_(bounds), |
55 context_factory_(context_factory), | 55 context_factory_(context_factory), |
56 context_factory_private_(context_factory_private), | 56 context_factory_private_(context_factory_private), |
57 compositor_(context_factory_private_->AllocateFrameSinkId(), | 57 compositor_(context_factory_private_->AllocateFrameSinkId(), |
58 context_factory_, | 58 context_factory_, |
59 context_factory_private_, | 59 context_factory_private_, |
60 base::ThreadTaskRunnerHandle::Get(), | 60 base::ThreadTaskRunnerHandle::Get(), |
61 false /* enable_surface_synchronization */) {} | 61 false /* enable_surface_synchronization */, |
| 62 false /* enable_pixel_canvas */) {} |
62 | 63 |
63 TestCompositorHostX11::~TestCompositorHostX11() {} | 64 TestCompositorHostX11::~TestCompositorHostX11() {} |
64 | 65 |
65 void TestCompositorHostX11::Show() { | 66 void TestCompositorHostX11::Show() { |
66 XDisplay* display = gfx::GetXDisplay(); | 67 XDisplay* display = gfx::GetXDisplay(); |
67 XSetWindowAttributes swa; | 68 XSetWindowAttributes swa; |
68 swa.override_redirect = True; | 69 swa.override_redirect = True; |
69 window_ = XCreateWindow( | 70 window_ = XCreateWindow( |
70 display, | 71 display, |
71 RootWindow(display, DefaultScreen(display)), // parent | 72 RootWindow(display, DefaultScreen(display)), // parent |
(...skipping 25 matching lines...) Expand all Loading... |
97 // static | 98 // static |
98 TestCompositorHost* TestCompositorHost::Create( | 99 TestCompositorHost* TestCompositorHost::Create( |
99 const gfx::Rect& bounds, | 100 const gfx::Rect& bounds, |
100 ui::ContextFactory* context_factory, | 101 ui::ContextFactory* context_factory, |
101 ui::ContextFactoryPrivate* context_factory_private) { | 102 ui::ContextFactoryPrivate* context_factory_private) { |
102 return new TestCompositorHostX11(bounds, context_factory, | 103 return new TestCompositorHostX11(bounds, context_factory, |
103 context_factory_private); | 104 context_factory_private); |
104 } | 105 } |
105 | 106 |
106 } // namespace ui | 107 } // namespace ui |
OLD | NEW |