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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_thread.cc

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 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
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
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
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc ('k') | ui/ozone/platform/drm/gpu/drm_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698