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

Unified Diff: ui/ozone/platform/drm/gpu/mock_hardware_display_plane_manager.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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/drm/gpu/mock_hardware_display_plane_manager.cc
diff --git a/ui/ozone/platform/drm/gpu/mock_hardware_display_plane_manager.cc b/ui/ozone/platform/drm/gpu/mock_hardware_display_plane_manager.cc
index a01818d864620989f35399c000a096c285fcc88e..179e6f9bf8994e03b47f945226dfe8c8e27ac86d 100644
--- a/ui/ozone/platform/drm/gpu/mock_hardware_display_plane_manager.cc
+++ b/ui/ozone/platform/drm/gpu/mock_hardware_display_plane_manager.cc
@@ -22,7 +22,7 @@ MockHardwareDisplayPlaneManager::MockHardwareDisplayPlaneManager(
crtcs_ = crtcs;
for (size_t crtc_idx = 0; crtc_idx < crtcs_.size(); crtc_idx++) {
for (size_t i = 0; i < planes_per_crtc; i++) {
- scoped_ptr<HardwareDisplayPlane> plane(
+ std::unique_ptr<HardwareDisplayPlane> plane(
new HardwareDisplayPlane(kPlaneBaseId + i, 1 << crtc_idx));
plane->Initialize(drm, std::vector<uint32_t>(1, DRM_FORMAT_XRGB8888),
false, true);
@@ -32,8 +32,8 @@ MockHardwareDisplayPlaneManager::MockHardwareDisplayPlaneManager(
// The real HDPM uses sorted planes, so sort them for consistency.
std::sort(planes_.begin(), planes_.end(),
- [](const scoped_ptr<HardwareDisplayPlane>& l,
- const scoped_ptr<HardwareDisplayPlane>& r) {
+ [](const std::unique_ptr<HardwareDisplayPlane>& l,
+ const std::unique_ptr<HardwareDisplayPlane>& r) {
return l->plane_id() < r->plane_id();
});
}
@@ -52,15 +52,15 @@ void MockHardwareDisplayPlaneManager::InitForTest(
crtcs_ = crtcs;
planes_.clear();
for (size_t i = 0; i < count; i++) {
- scoped_ptr<HardwareDisplayPlane> plane(
+ std::unique_ptr<HardwareDisplayPlane> plane(
new HardwareDisplayPlane(planes[i].id, planes[i].allowed_crtc_mask));
plane->Initialize(drm_, planes[i].allowed_formats, false, true);
planes_.push_back(std::move(plane));
}
// The real HDPM uses sorted planes, so sort them for consistency.
std::sort(planes_.begin(), planes_.end(),
- [](const scoped_ptr<HardwareDisplayPlane>& l,
- const scoped_ptr<HardwareDisplayPlane>& r) {
+ [](const std::unique_ptr<HardwareDisplayPlane>& l,
+ const std::unique_ptr<HardwareDisplayPlane>& r) {
return l->plane_id() < r->plane_id();
});
}
@@ -70,7 +70,7 @@ void MockHardwareDisplayPlaneManager::SetPlaneProperties(
planes_.clear();
uint32_t count = planes.size();
for (size_t i = 0; i < count; i++) {
- scoped_ptr<HardwareDisplayPlane> plane(
+ std::unique_ptr<HardwareDisplayPlane> plane(
new HardwareDisplayPlane(planes[i].id, planes[i].allowed_crtc_mask));
plane->Initialize(drm_, planes[i].allowed_formats, false, true);
planes_.push_back(std::move(plane));
@@ -78,8 +78,8 @@ void MockHardwareDisplayPlaneManager::SetPlaneProperties(
// The real HDPM uses sorted planes, so sort them for consistency.
std::sort(planes_.begin(), planes_.end(),
- [](const scoped_ptr<HardwareDisplayPlane>& l,
- const scoped_ptr<HardwareDisplayPlane>& r) {
+ [](const std::unique_ptr<HardwareDisplayPlane>& l,
+ const std::unique_ptr<HardwareDisplayPlane>& r) {
return l->plane_id() < r->plane_id();
});
« no previous file with comments | « ui/ozone/platform/drm/gpu/hardware_display_plane_manager_unittest.cc ('k') | ui/ozone/platform/drm/gpu/page_flip_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698