| 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/hardware_display_plane_manager.h" | 5 #include "ui/ozone/platform/dri/hardware_display_plane_manager.h" |
| 6 | 6 |
| 7 #include <drm.h> | 7 #include <drm.h> |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <xf86drm.h> | 9 #include <xf86drm.h> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 HardwareDisplayPlaneManager::HardwareDisplayPlaneManager() : drm_(nullptr) { | 62 HardwareDisplayPlaneManager::HardwareDisplayPlaneManager() : drm_(nullptr) { |
| 63 } | 63 } |
| 64 | 64 |
| 65 HardwareDisplayPlaneManager::~HardwareDisplayPlaneManager() { | 65 HardwareDisplayPlaneManager::~HardwareDisplayPlaneManager() { |
| 66 } | 66 } |
| 67 | 67 |
| 68 bool HardwareDisplayPlaneManager::Initialize(DriWrapper* drm) { | 68 bool HardwareDisplayPlaneManager::Initialize(DriWrapper* drm) { |
| 69 drm_ = drm; | 69 drm_ = drm; |
| 70 ScopedDrmResourcesPtr resources(drmModeGetResources(drm->get_fd())); | 70 ScopedDrmResourcesPtr resources(drmModeGetResources(drm->get_fd())); |
| 71 if (!resources) { | 71 if (!resources) { |
| 72 LOG(ERROR) << "Failed to get resources."; | 72 PLOG(ERROR) << "Failed to get resources"; |
| 73 return false; | 73 return false; |
| 74 } | 74 } |
| 75 | 75 |
| 76 ScopedDrmPlaneResPtr plane_resources(drmModeGetPlaneResources(drm->get_fd())); | 76 ScopedDrmPlaneResPtr plane_resources(drmModeGetPlaneResources(drm->get_fd())); |
| 77 if (!plane_resources) { | 77 if (!plane_resources) { |
| 78 LOG(ERROR) << "Failed to get plane resources."; | 78 LOG(ERROR) << "Failed to get plane resources."; |
| 79 return false; | 79 return false; |
| 80 } | 80 } |
| 81 | 81 |
| 82 crtcs_.clear(); | 82 crtcs_.clear(); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 if (plane->owning_crtc() == crtc_id) { | 205 if (plane->owning_crtc() == crtc_id) { |
| 206 plane->set_owning_crtc(0); | 206 plane->set_owning_crtc(0); |
| 207 plane->set_in_use(false); | 207 plane->set_in_use(false); |
| 208 } else { | 208 } else { |
| 209 plane_list->old_plane_list.push_back(plane); | 209 plane_list->old_plane_list.push_back(plane); |
| 210 } | 210 } |
| 211 } | 211 } |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace ui | 214 } // namespace ui |
| OLD | NEW |