OLD | NEW |
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 "ui/display/types/gamma_ramp_rgb_entry.h" | 9 #include "ui/display/types/gamma_ramp_rgb_entry.h" |
10 #include "ui/ozone/common/display_util.h" | 10 #include "ui/ozone/common/display_util.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 params_list.push_back( | 92 params_list.push_back( |
93 displays_.back()->Update(display_info, device_index)); | 93 displays_.back()->Update(display_info, device_index)); |
94 } | 94 } |
95 device_index++; | 95 device_index++; |
96 } | 96 } |
97 | 97 |
98 NotifyScreenManager(displays_, old_displays); | 98 NotifyScreenManager(displays_, old_displays); |
99 return params_list; | 99 return params_list; |
100 } | 100 } |
101 | 101 |
| 102 const std::vector<uint32_t>& DrmGpuDisplayManager::GetSupportedFormats() const { |
| 103 return drm_device_manager_->GetDrmDevice(gfx::kNullAcceleratedWidget) |
| 104 ->plane_manager() |
| 105 ->GetSupportedFormats(); |
| 106 } |
| 107 |
102 bool DrmGpuDisplayManager::TakeDisplayControl() { | 108 bool DrmGpuDisplayManager::TakeDisplayControl() { |
103 const DrmDeviceVector& devices = drm_device_manager_->GetDrmDevices(); | 109 const DrmDeviceVector& devices = drm_device_manager_->GetDrmDevices(); |
104 bool status = true; | 110 bool status = true; |
105 for (const auto& drm : devices) | 111 for (const auto& drm : devices) |
106 status &= drm->SetMaster(); | 112 status &= drm->SetMaster(); |
107 | 113 |
108 // Roll-back any successful operation. | 114 // Roll-back any successful operation. |
109 if (!status) { | 115 if (!status) { |
110 LOG(ERROR) << "Failed to take control of the display"; | 116 LOG(ERROR) << "Failed to take control of the display"; |
111 RelinquishDisplayControl(); | 117 RelinquishDisplayControl(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 DisplayComparator(new_display.get())); | 229 DisplayComparator(new_display.get())); |
224 | 230 |
225 if (it == old_displays.end()) { | 231 if (it == old_displays.end()) { |
226 screen_manager_->AddDisplayController( | 232 screen_manager_->AddDisplayController( |
227 new_display->drm(), new_display->crtc(), new_display->connector()); | 233 new_display->drm(), new_display->crtc(), new_display->connector()); |
228 } | 234 } |
229 } | 235 } |
230 } | 236 } |
231 | 237 |
232 } // namespace ui | 238 } // namespace ui |
OLD | NEW |