| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_atomic.h" | 5 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 if (!id) { | 44 if (!id) { |
| 45 LOG(ERROR) << "Could not find property " << name; | 45 LOG(ERROR) << "Could not find property " << name; |
| 46 return false; | 46 return false; |
| 47 } | 47 } |
| 48 return true; | 48 return true; |
| 49 } | 49 } |
| 50 | 50 |
| 51 HardwareDisplayPlaneAtomic::HardwareDisplayPlaneAtomic(uint32_t plane_id, | 51 HardwareDisplayPlaneAtomic::HardwareDisplayPlaneAtomic(uint32_t plane_id, |
| 52 uint32_t possible_crtcs) | 52 uint32_t possible_crtcs) |
| 53 : HardwareDisplayPlane(plane_id, possible_crtcs) { | 53 : HardwareDisplayPlane(plane_id, possible_crtcs), crtc_(nullptr) { |
| 54 } | 54 } |
| 55 HardwareDisplayPlaneAtomic::~HardwareDisplayPlaneAtomic() { | 55 HardwareDisplayPlaneAtomic::~HardwareDisplayPlaneAtomic() { |
| 56 } | 56 } |
| 57 | 57 |
| 58 bool HardwareDisplayPlaneAtomic::SetPlaneData(drmModePropertySet* property_set, | 58 bool HardwareDisplayPlaneAtomic::SetPlaneData(drmModePropertySet* property_set, |
| 59 uint32_t crtc_id, | 59 uint32_t crtc_id, |
| 60 uint32_t framebuffer, | 60 uint32_t framebuffer, |
| 61 const gfx::Rect& crtc_rect, | 61 const gfx::Rect& crtc_rect, |
| 62 const gfx::Rect& src_rect) { | 62 const gfx::Rect& src_rect) { |
| 63 int plane_set_error = | 63 int plane_set_error = |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 src_h_prop_.Initialize(drm, kSrcHPropName, plane_props); | 108 src_h_prop_.Initialize(drm, kSrcHPropName, plane_props); |
| 109 | 109 |
| 110 if (!props_init) { | 110 if (!props_init) { |
| 111 LOG(ERROR) << "Unable to get plane properties."; | 111 LOG(ERROR) << "Unable to get plane properties."; |
| 112 return false; | 112 return false; |
| 113 } | 113 } |
| 114 return true; | 114 return true; |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace ui | 117 } // namespace ui |
| OLD | NEW |