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

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

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/cast/ozone_platform_cast.cc ('k') | ui/ozone/platform/drm/gpu/drm_thread.cc » ('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/drm_gpu_display_manager.h" 5 #include "ui/ozone/platform/drm/gpu/drm_gpu_display_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "ui/display/types/gamma_ramp_rgb_entry.h" 10 #include "ui/display/types/gamma_ramp_rgb_entry.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 GetAvailableDisplayControllerInfos(drm->get_fd()); 80 GetAvailableDisplayControllerInfos(drm->get_fd());
81 for (auto* display_info : display_infos) { 81 for (auto* display_info : display_infos) {
82 auto it = std::find_if( 82 auto it = std::find_if(
83 old_displays.begin(), old_displays.end(), 83 old_displays.begin(), old_displays.end(),
84 DisplayComparator(drm, display_info->crtc()->crtc_id, 84 DisplayComparator(drm, display_info->crtc()->crtc_id,
85 display_info->connector()->connector_id)); 85 display_info->connector()->connector_id));
86 if (it != old_displays.end()) { 86 if (it != old_displays.end()) {
87 displays_.push_back(std::move(*it)); 87 displays_.push_back(std::move(*it));
88 old_displays.erase(it); 88 old_displays.erase(it);
89 } else { 89 } else {
90 displays_.push_back( 90 displays_.push_back(base::MakeUnique<DrmDisplay>(screen_manager_, drm));
91 base::WrapUnique(new DrmDisplay(screen_manager_, drm)));
92 } 91 }
93 params_list.push_back( 92 params_list.push_back(
94 displays_.back()->Update(display_info, device_index)); 93 displays_.back()->Update(display_info, device_index));
95 } 94 }
96 device_index++; 95 device_index++;
97 } 96 }
98 97
99 NotifyScreenManager(displays_, old_displays); 98 NotifyScreenManager(displays_, old_displays);
100 return params_list; 99 return params_list;
101 } 100 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 DisplayComparator(new_display.get())); 236 DisplayComparator(new_display.get()));
238 237
239 if (it == old_displays.end()) { 238 if (it == old_displays.end()) {
240 screen_manager_->AddDisplayController( 239 screen_manager_->AddDisplayController(
241 new_display->drm(), new_display->crtc(), new_display->connector()); 240 new_display->drm(), new_display->crtc(), new_display->connector());
242 } 241 }
243 } 242 }
244 } 243 }
245 244
246 } // namespace ui 245 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/cast/ozone_platform_cast.cc ('k') | ui/ozone/platform/drm/gpu/drm_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698