| 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/host/drm_display_host_manager.h" | 5 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <xf86drm.h> | 9 #include <xf86drm.h> |
| 10 | 10 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 CreateDisplaySnapshotParams( | 148 CreateDisplaySnapshotParams( |
| 149 display_info.get(), primary_drm_device_handle_->fd(), | 149 display_info.get(), primary_drm_device_handle_->fd(), |
| 150 primary_drm_device_handle_->sys_path(), 0, gfx::Point()), | 150 primary_drm_device_handle_->sys_path(), 0, gfx::Point()), |
| 151 true /* is_dummy */)); | 151 true /* is_dummy */)); |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 DrmDisplayHostManager::~DrmDisplayHostManager() { | 155 DrmDisplayHostManager::~DrmDisplayHostManager() { |
| 156 device_manager_->RemoveObserver(this); | 156 device_manager_->RemoveObserver(this); |
| 157 proxy_->UnRegisterHandlerForDrmDisplayHostManager(); | 157 proxy_->UnRegisterHandlerForDrmDisplayHostManager(); |
| 158 proxy_->RemoveGpuThreadObserver(this); |
| 158 } | 159 } |
| 159 | 160 |
| 160 DrmDisplayHost* DrmDisplayHostManager::GetDisplay(int64_t display_id) { | 161 DrmDisplayHost* DrmDisplayHostManager::GetDisplay(int64_t display_id) { |
| 161 auto it = std::find_if(displays_.begin(), displays_.end(), | 162 auto it = std::find_if(displays_.begin(), displays_.end(), |
| 162 FindDrmDisplayHostById(display_id)); | 163 FindDrmDisplayHostById(display_id)); |
| 163 if (it == displays_.end()) | 164 if (it == displays_.end()) |
| 164 return nullptr; | 165 return nullptr; |
| 165 | 166 |
| 166 return it->get(); | 167 return it->get(); |
| 167 } | 168 } |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 | 466 |
| 466 callback.Run(snapshots); | 467 callback.Run(snapshots); |
| 467 } | 468 } |
| 468 | 469 |
| 469 void DrmDisplayHostManager::NotifyDisplayDelegate() const { | 470 void DrmDisplayHostManager::NotifyDisplayDelegate() const { |
| 470 if (delegate_) | 471 if (delegate_) |
| 471 delegate_->OnConfigurationChanged(); | 472 delegate_->OnConfigurationChanged(); |
| 472 } | 473 } |
| 473 | 474 |
| 474 } // namespace ui | 475 } // namespace ui |
| OLD | NEW |