OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ozone/platform/drm/gpu/drm_thread.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_thread.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 if (!StartWithOptions(thread_options)) | 84 if (!StartWithOptions(thread_options)) |
85 LOG(FATAL) << "Failed to create DRM thread"; | 85 LOG(FATAL) << "Failed to create DRM thread"; |
86 } | 86 } |
87 | 87 |
88 void DrmThread::Init() { | 88 void DrmThread::Init() { |
89 bool use_atomic = false; | 89 bool use_atomic = false; |
90 #if defined(USE_DRM_ATOMIC) | 90 #if defined(USE_DRM_ATOMIC) |
91 use_atomic = true; | 91 use_atomic = true; |
92 #endif | 92 #endif |
93 | 93 |
94 device_manager_.reset(new DrmDeviceManager( | 94 device_manager_.reset( |
95 base::WrapUnique(new GbmDeviceGenerator(use_atomic)))); | 95 new DrmDeviceManager(base::MakeUnique<GbmDeviceGenerator>(use_atomic))); |
96 buffer_generator_.reset(new GbmBufferGenerator()); | 96 buffer_generator_.reset(new GbmBufferGenerator()); |
97 screen_manager_.reset(new ScreenManager(buffer_generator_.get())); | 97 screen_manager_.reset(new ScreenManager(buffer_generator_.get())); |
98 | 98 |
99 display_manager_.reset( | 99 display_manager_.reset( |
100 new DrmGpuDisplayManager(screen_manager_.get(), device_manager_.get())); | 100 new DrmGpuDisplayManager(screen_manager_.get(), device_manager_.get())); |
101 } | 101 } |
102 | 102 |
103 void DrmThread::CreateBuffer(gfx::AcceleratedWidget widget, | 103 void DrmThread::CreateBuffer(gfx::AcceleratedWidget widget, |
104 const gfx::Size& size, | 104 const gfx::Size& size, |
105 gfx::BufferFormat format, | 105 gfx::BufferFormat format, |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 correction_matrix); | 255 correction_matrix); |
256 } | 256 } |
257 | 257 |
258 // DrmThread requires a BindingSet instead of a simple Binding because it will | 258 // DrmThread requires a BindingSet instead of a simple Binding because it will |
259 // be used from multiple threads in multiple processes. | 259 // be used from multiple threads in multiple processes. |
260 void DrmThread::AddBinding(ozone::mojom::DeviceCursorRequest request) { | 260 void DrmThread::AddBinding(ozone::mojom::DeviceCursorRequest request) { |
261 bindings_.AddBinding(this, std::move(request)); | 261 bindings_.AddBinding(this, std::move(request)); |
262 } | 262 } |
263 | 263 |
264 } // namespace ui | 264 } // namespace ui |
OLD | NEW |