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/dri/native_display_delegate_dri.h" | 5 #include "ui/ozone/platform/dri/native_display_delegate_dri.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ui/display/types/native_display_observer.h" | 8 #include "ui/display/types/native_display_observer.h" |
9 #include "ui/events/ozone/device/device_event.h" | 9 #include "ui/events/ozone/device/device_event.h" |
10 #include "ui/ozone/platform/dri/display_mode_dri.h" | 10 #include "ui/ozone/platform/dri/display_mode_dri.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 if (mode) { | 194 if (mode) { |
195 if (!screen_manager_->ConfigureDisplayController( | 195 if (!screen_manager_->ConfigureDisplayController( |
196 dri_output.crtc(), dri_output.connector(), origin, | 196 dri_output.crtc(), dri_output.connector(), origin, |
197 static_cast<const DisplayModeDri*>(mode)->mode_info())) { | 197 static_cast<const DisplayModeDri*>(mode)->mode_info())) { |
198 VLOG(1) << "Failed to configure: crtc=" << dri_output.crtc() | 198 VLOG(1) << "Failed to configure: crtc=" << dri_output.crtc() |
199 << " connector=" << dri_output.connector(); | 199 << " connector=" << dri_output.connector(); |
200 return false; | 200 return false; |
201 } | 201 } |
202 } else { | 202 } else { |
| 203 if (dri_output.dpms_property()) { |
| 204 dri_->SetProperty(dri_output.connector(), |
| 205 dri_output.dpms_property()->prop_id, DRM_MODE_DPMS_OFF); |
| 206 } |
| 207 |
203 if (!screen_manager_->DisableDisplayController(dri_output.crtc())) { | 208 if (!screen_manager_->DisableDisplayController(dri_output.crtc())) { |
204 VLOG(1) << "Failed to disable crtc=" << dri_output.crtc(); | 209 VLOG(1) << "Failed to disable crtc=" << dri_output.crtc(); |
205 return false; | 210 return false; |
206 } | 211 } |
207 } | 212 } |
208 | 213 |
209 return true; | 214 return true; |
210 } | 215 } |
211 | 216 |
212 void NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output, | 217 void NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 std::find_if(old_displays.begin(), old_displays.end(), | 321 std::find_if(old_displays.begin(), old_displays.end(), |
317 DisplaySnapshotComparator(new_displays[i])); | 322 DisplaySnapshotComparator(new_displays[i])); |
318 | 323 |
319 if (it == old_displays.end()) | 324 if (it == old_displays.end()) |
320 screen_manager_->AddDisplayController(dri_, new_displays[i]->crtc(), | 325 screen_manager_->AddDisplayController(dri_, new_displays[i]->crtc(), |
321 new_displays[i]->connector()); | 326 new_displays[i]->connector()); |
322 } | 327 } |
323 } | 328 } |
324 | 329 |
325 } // namespace ui | 330 } // namespace ui |
OLD | NEW |