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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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"
11 #include "base/memory/ptr_util.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 #include "base/trace_event/trace_event.h" 13 #include "base/trace_event/trace_event.h"
13 #include "third_party/skia/include/core/SkBitmap.h" 14 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "third_party/skia/include/core/SkCanvas.h" 15 #include "third_party/skia/include/core/SkCanvas.h"
15 #include "third_party/skia/include/core/SkSurface.h" 16 #include "third_party/skia/include/core/SkSurface.h"
16 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" 17 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
17 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" 18 #include "ui/ozone/platform/drm/gpu/crtc_controller.h"
18 #include "ui/ozone/platform/drm/gpu/drm_buffer.h" 19 #include "ui/ozone/platform/drm/gpu/drm_buffer.h"
19 #include "ui/ozone/platform/drm/gpu/drm_device.h" 20 #include "ui/ozone/platform/drm/gpu/drm_device.h"
20 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" 21 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 60 }
60 61
61 DrmWindow::~DrmWindow() { 62 DrmWindow::~DrmWindow() {
62 } 63 }
63 64
64 void DrmWindow::Initialize(ScanoutBufferGenerator* buffer_generator) { 65 void DrmWindow::Initialize(ScanoutBufferGenerator* buffer_generator) {
65 TRACE_EVENT1("drm", "DrmWindow::Initialize", "widget", widget_); 66 TRACE_EVENT1("drm", "DrmWindow::Initialize", "widget", widget_);
66 67
67 device_manager_->UpdateDrmDevice(widget_, nullptr); 68 device_manager_->UpdateDrmDevice(widget_, nullptr);
68 overlay_validator_ = 69 overlay_validator_ =
69 make_scoped_ptr(new DrmOverlayValidator(this, buffer_generator)); 70 base::WrapUnique(new DrmOverlayValidator(this, buffer_generator));
70 } 71 }
71 72
72 void DrmWindow::Shutdown() { 73 void DrmWindow::Shutdown() {
73 TRACE_EVENT1("drm", "DrmWindow::Shutdown", "widget", widget_); 74 TRACE_EVENT1("drm", "DrmWindow::Shutdown", "widget", widget_);
74 device_manager_->RemoveDrmDevice(widget_); 75 device_manager_->RemoveDrmDevice(widget_);
75 } 76 }
76 77
77 gfx::AcceleratedWidget DrmWindow::GetAcceleratedWidget() { 78 gfx::AcceleratedWidget DrmWindow::GetAcceleratedWidget() {
78 return widget_; 79 return widget_;
79 } 80 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (!cursor_buffers_[i]->Initialize( 249 if (!cursor_buffers_[i]->Initialize(
249 info, false /* should_register_framebuffer */)) { 250 info, false /* should_register_framebuffer */)) {
250 LOG(FATAL) << "Failed to initialize cursor buffer"; 251 LOG(FATAL) << "Failed to initialize cursor buffer";
251 return; 252 return;
252 } 253 }
253 } 254 }
254 } 255 }
255 } 256 }
256 257
257 } // namespace ui 258 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window.h ('k') | ui/ozone/platform/drm/gpu/drm_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698