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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_window.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_window.h" 5 #include "ui/ozone/platform/drm/gpu/drm_window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 DrmWindow::~DrmWindow() { 55 DrmWindow::~DrmWindow() {
56 } 56 }
57 57
58 void DrmWindow::Initialize(ScanoutBufferGenerator* buffer_generator) { 58 void DrmWindow::Initialize(ScanoutBufferGenerator* buffer_generator) {
59 TRACE_EVENT1("drm", "DrmWindow::Initialize", "widget", widget_); 59 TRACE_EVENT1("drm", "DrmWindow::Initialize", "widget", widget_);
60 60
61 device_manager_->UpdateDrmDevice(widget_, nullptr); 61 device_manager_->UpdateDrmDevice(widget_, nullptr);
62 overlay_validator_ = 62 overlay_validator_ =
63 base::WrapUnique(new DrmOverlayValidator(this, buffer_generator)); 63 base::MakeUnique<DrmOverlayValidator>(this, buffer_generator);
64 } 64 }
65 65
66 void DrmWindow::Shutdown() { 66 void DrmWindow::Shutdown() {
67 TRACE_EVENT1("drm", "DrmWindow::Shutdown", "widget", widget_); 67 TRACE_EVENT1("drm", "DrmWindow::Shutdown", "widget", widget_);
68 device_manager_->RemoveDrmDevice(widget_); 68 device_manager_->RemoveDrmDevice(widget_);
69 } 69 }
70 70
71 gfx::AcceleratedWidget DrmWindow::GetAcceleratedWidget() { 71 gfx::AcceleratedWidget DrmWindow::GetAcceleratedWidget() {
72 return widget_; 72 return widget_;
73 } 73 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (!cursor_buffers_[i]->Initialize( 251 if (!cursor_buffers_[i]->Initialize(
252 info, false /* should_register_framebuffer */)) { 252 info, false /* should_register_framebuffer */)) {
253 LOG(FATAL) << "Failed to initialize cursor buffer"; 253 LOG(FATAL) << "Failed to initialize cursor buffer";
254 return; 254 return;
255 } 255 }
256 } 256 }
257 } 257 }
258 } 258 }
259 259
260 } // namespace ui 260 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread_proxy.cc ('k') | ui/ozone/platform/drm/gpu/screen_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698