| 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/hardware_display_plane.h" | 5 #include "ui/ozone/platform/drm/gpu/hardware_display_plane.h" |
| 6 | 6 |
| 7 #include <drm_fourcc.h> | 7 #include <drm_fourcc.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ui/ozone/platform/drm/gpu/drm_device.h" | 10 #include "ui/ozone/platform/drm/gpu/drm_device.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 PLOG(ERROR) << "Unable to get plane properties."; | 75 PLOG(ERROR) << "Unable to get plane properties."; |
| 76 return false; | 76 return false; |
| 77 } | 77 } |
| 78 | 78 |
| 79 uint32_t count_props = plane_props->count_props; | 79 uint32_t count_props = plane_props->count_props; |
| 80 for (uint32_t i = 0; i < count_props; i++) { | 80 for (uint32_t i = 0; i < count_props; i++) { |
| 81 ScopedDrmPropertyPtr property( | 81 ScopedDrmPropertyPtr property( |
| 82 drmModeGetProperty(drm->get_fd(), plane_props->props[i])); | 82 drmModeGetProperty(drm->get_fd(), plane_props->props[i])); |
| 83 if (property && !strcmp(property->name, kTypePropName)) { | 83 if (property && !strcmp(property->name, kTypePropName)) { |
| 84 type_ = GetPlaneType(plane_props->prop_values[i]); | 84 type_ = GetPlaneType(plane_props->prop_values[i]); |
| 85 break; |
| 85 } | 86 } |
| 86 } | 87 } |
| 87 | 88 |
| 88 return InitializeProperties(drm, plane_props); | 89 return InitializeProperties(drm, plane_props); |
| 89 } | 90 } |
| 90 | 91 |
| 91 bool HardwareDisplayPlane::IsSupportedFormat(uint32_t format) { | 92 bool HardwareDisplayPlane::IsSupportedFormat(uint32_t format) { |
| 92 if (!format) | 93 if (!format) |
| 93 return false; | 94 return false; |
| 94 | 95 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 106 return false; | 107 return false; |
| 107 } | 108 } |
| 108 | 109 |
| 109 bool HardwareDisplayPlane::InitializeProperties( | 110 bool HardwareDisplayPlane::InitializeProperties( |
| 110 DrmDevice* drm, | 111 DrmDevice* drm, |
| 111 const ScopedDrmObjectPropertyPtr& plane_props) { | 112 const ScopedDrmObjectPropertyPtr& plane_props) { |
| 112 return true; | 113 return true; |
| 113 } | 114 } |
| 114 | 115 |
| 115 } // namespace ui | 116 } // namespace ui |
| OLD | NEW |