| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 bool is_dummy, | 59 bool is_dummy, |
| 60 bool test_only) { | 60 bool test_only) { |
| 61 supported_formats_ = formats; | 61 supported_formats_ = formats; |
| 62 | 62 |
| 63 if (test_only) | 63 if (test_only) |
| 64 return true; | 64 return true; |
| 65 | 65 |
| 66 if (is_dummy) { | 66 if (is_dummy) { |
| 67 type_ = kDummy; | 67 type_ = kDummy; |
| 68 supported_formats_.push_back(DRM_FORMAT_XRGB8888); | 68 supported_formats_.push_back(DRM_FORMAT_XRGB8888); |
| 69 supported_formats_.push_back(DRM_FORMAT_XBGR8888); |
| 69 return true; | 70 return true; |
| 70 } | 71 } |
| 71 | 72 |
| 72 ScopedDrmObjectPropertyPtr plane_props(drmModeObjectGetProperties( | 73 ScopedDrmObjectPropertyPtr plane_props(drmModeObjectGetProperties( |
| 73 drm->get_fd(), plane_id_, DRM_MODE_OBJECT_PLANE)); | 74 drm->get_fd(), plane_id_, DRM_MODE_OBJECT_PLANE)); |
| 74 if (!plane_props) { | 75 if (!plane_props) { |
| 75 PLOG(ERROR) << "Unable to get plane properties."; | 76 PLOG(ERROR) << "Unable to get plane properties."; |
| 76 return false; | 77 return false; |
| 77 } | 78 } |
| 78 | 79 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return supported_formats_; | 112 return supported_formats_; |
| 112 } | 113 } |
| 113 | 114 |
| 114 bool HardwareDisplayPlane::InitializeProperties( | 115 bool HardwareDisplayPlane::InitializeProperties( |
| 115 DrmDevice* drm, | 116 DrmDevice* drm, |
| 116 const ScopedDrmObjectPropertyPtr& plane_props) { | 117 const ScopedDrmObjectPropertyPtr& plane_props) { |
| 117 return true; | 118 return true; |
| 118 } | 119 } |
| 119 | 120 |
| 120 } // namespace ui | 121 } // namespace ui |
| OLD | NEW |