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

Side by Side Diff: ui/ozone/platform/drm/gpu/crtc_controller.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/common/scoped_drm_types.h ('k') | ui/ozone/platform/drm/gpu/drm_device.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 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/crtc_controller.h" 5 #include "ui/ozone/platform/drm/gpu/crtc_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "ui/ozone/platform/drm/gpu/drm_device.h" 9 #include "ui/ozone/platform/drm/gpu/drm_device.h"
10 #include "ui/ozone/platform/drm/gpu/page_flip_request.h" 10 #include "ui/ozone/platform/drm/gpu/page_flip_request.h"
11 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" 11 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h"
12 12
13 namespace ui { 13 namespace ui {
14 14
15 CrtcController::CrtcController(const scoped_refptr<DrmDevice>& drm, 15 CrtcController::CrtcController(const scoped_refptr<DrmDevice>& drm,
16 uint32_t crtc, 16 uint32_t crtc,
17 uint32_t connector) 17 uint32_t connector)
18 : drm_(drm), 18 : drm_(drm),
19 crtc_(crtc), 19 crtc_(crtc),
20 connector_(connector) {} 20 connector_(connector) {}
21 21
22 CrtcController::~CrtcController() { 22 CrtcController::~CrtcController() {
23 if (!is_disabled_) { 23 if (!is_disabled_) {
24 const std::vector<scoped_ptr<HardwareDisplayPlane>>& all_planes = 24 const std::vector<std::unique_ptr<HardwareDisplayPlane>>& all_planes =
25 drm_->plane_manager()->planes(); 25 drm_->plane_manager()->planes();
26 for (const auto& plane : all_planes) { 26 for (const auto& plane : all_planes) {
27 if (plane->owning_crtc() == crtc_) { 27 if (plane->owning_crtc() == crtc_) {
28 plane->set_owning_crtc(0); 28 plane->set_owning_crtc(0);
29 plane->set_in_use(false); 29 plane->set_in_use(false);
30 } 30 }
31 } 31 }
32 32
33 SetCursor(nullptr); 33 SetCursor(nullptr);
34 drm_->DisableCrtc(crtc_); 34 drm_->DisableCrtc(crtc_);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 current_planes_.swap(pending_planes_); 166 current_planes_.swap(pending_planes_);
167 167
168 pending_planes_.clear(); 168 pending_planes_.clear();
169 169
170 scoped_refptr<PageFlipRequest> request; 170 scoped_refptr<PageFlipRequest> request;
171 request.swap(page_flip_request_); 171 request.swap(page_flip_request_);
172 request->Signal(result); 172 request->Signal(result);
173 } 173 }
174 174
175 } // namespace ui 175 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/common/scoped_drm_types.h ('k') | ui/ozone/platform/drm/gpu/drm_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698