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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_thread_proxy.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
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread_proxy.h ('k') | ui/ozone/platform/drm/gpu/drm_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_proxy.h" 5 #include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h"
8 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h" 9 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h"
9 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" 10 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h"
10 #include "ui/ozone/platform/drm/gpu/gbm_buffer.h" 11 #include "ui/ozone/platform/drm/gpu/gbm_buffer.h"
11 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h" 12 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h"
12 13
13 namespace ui { 14 namespace ui {
14 15
15 DrmThreadProxy::DrmThreadProxy() {} 16 DrmThreadProxy::DrmThreadProxy() {}
16 17
17 DrmThreadProxy::~DrmThreadProxy() {} 18 DrmThreadProxy::~DrmThreadProxy() {}
18 19
19 void DrmThreadProxy::BindThreadIntoMessagingProxy( 20 void DrmThreadProxy::BindThreadIntoMessagingProxy(
20 InterThreadMessagingProxy* messaging_proxy) { 21 InterThreadMessagingProxy* messaging_proxy) {
21 messaging_proxy->SetDrmThread(&drm_thread_); 22 messaging_proxy->SetDrmThread(&drm_thread_);
22 } 23 }
23 24
24 scoped_ptr<DrmWindowProxy> DrmThreadProxy::CreateDrmWindowProxy( 25 std::unique_ptr<DrmWindowProxy> DrmThreadProxy::CreateDrmWindowProxy(
25 gfx::AcceleratedWidget widget) { 26 gfx::AcceleratedWidget widget) {
26 return make_scoped_ptr(new DrmWindowProxy(widget, &drm_thread_)); 27 return base::WrapUnique(new DrmWindowProxy(widget, &drm_thread_));
27 } 28 }
28 29
29 scoped_refptr<GbmBuffer> DrmThreadProxy::CreateBuffer( 30 scoped_refptr<GbmBuffer> DrmThreadProxy::CreateBuffer(
30 gfx::AcceleratedWidget widget, 31 gfx::AcceleratedWidget widget,
31 const gfx::Size& size, 32 const gfx::Size& size,
32 gfx::BufferFormat format, 33 gfx::BufferFormat format,
33 gfx::BufferUsage usage) { 34 gfx::BufferUsage usage) {
34 scoped_refptr<GbmBuffer> buffer; 35 scoped_refptr<GbmBuffer> buffer;
35 PostSyncTask( 36 PostSyncTask(
36 drm_thread_.task_runner(), 37 drm_thread_.task_runner(),
(...skipping 18 matching lines...) Expand all
55 void DrmThreadProxy::GetScanoutFormats( 56 void DrmThreadProxy::GetScanoutFormats(
56 gfx::AcceleratedWidget widget, 57 gfx::AcceleratedWidget widget,
57 std::vector<gfx::BufferFormat>* scanout_formats) { 58 std::vector<gfx::BufferFormat>* scanout_formats) {
58 PostSyncTask( 59 PostSyncTask(
59 drm_thread_.task_runner(), 60 drm_thread_.task_runner(),
60 base::Bind(&DrmThread::GetScanoutFormats, base::Unretained(&drm_thread_), 61 base::Bind(&DrmThread::GetScanoutFormats, base::Unretained(&drm_thread_),
61 widget, scanout_formats)); 62 widget, scanout_formats));
62 } 63 }
63 64
64 } // namespace ui 65 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread_proxy.h ('k') | ui/ozone/platform/drm/gpu/drm_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698