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

Unified Diff: ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc

Issue 1438343002: Remove deprecated ScopedVector usage from ui/ozone and ui/events/ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove HDCI stuff Created 5 years, 1 month 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/hardware_display_plane_manager.cc
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
index 75905fc88f7f645ee4b839b34dc6d5b2a14c41a6..88ee51bd3161d917c77057ac8a09b61382a0100c 100644
--- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
+++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc
@@ -130,7 +130,8 @@ bool HardwareDisplayPlaneManager::Initialize(DrmDevice* drm) {
}
std::sort(planes_.begin(), planes_.end(),
- [](HardwareDisplayPlane* l, HardwareDisplayPlane* r) {
+ [](const scoped_ptr<HardwareDisplayPlane>& l,
+ const scoped_ptr<HardwareDisplayPlane>& r) {
return l->plane_id() < r->plane_id();
});
return true;
@@ -148,7 +149,7 @@ HardwareDisplayPlane* HardwareDisplayPlaneManager::FindNextUnusedPlane(
uint32_t crtc_index,
const OverlayPlane& overlay) const {
for (size_t i = *index; i < planes_.size(); ++i) {
- auto plane = planes_[i];
+ auto plane = planes_[i].get();
if (!plane->in_use() && IsCompatible(plane, overlay, crtc_index)) {
*index = i + 1;
return plane;
@@ -289,8 +290,8 @@ HardwareDisplayPlaneManager::GetCompatibleHardwarePlaneIds(
}
std::vector<uint32_t> plane_ids;
- for (auto* hardware_plane : planes_) {
- if (IsCompatible(hardware_plane, plane, crtc_index))
+ for (const auto& hardware_plane : planes_) {
+ if (IsCompatible(hardware_plane.get(), plane, crtc_index))
plane_ids.push_back(hardware_plane->plane_id());
}

Powered by Google App Engine
This is Rietveld 408576698