Chromium Code Reviews| Index: ui/ozone/platform/dri/hardware_display_plane.h |
| diff --git a/ui/ozone/platform/dri/hardware_display_plane.h b/ui/ozone/platform/dri/hardware_display_plane.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..588f7699afe5b4e5d0877bc91989135e854d2d3f |
| --- /dev/null |
| +++ b/ui/ozone/platform/dri/hardware_display_plane.h |
| @@ -0,0 +1,72 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_ |
| +#define UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_ |
| + |
| +#include <stddef.h> |
| +#include <stdint.h> |
| +#include <xf86drmMode.h> |
| + |
| +#include "base/basictypes.h" |
| + |
| +namespace gfx { |
| +class Rect; |
| +} |
| + |
| +namespace ui { |
| + |
| +class DriWrapper; |
| + |
| +class HardwareDisplayPlane { |
| + public: |
| + HardwareDisplayPlane(DriWrapper* drm, |
| + drmModePropertySetPtr atomic_property_set, |
| + drmModePlanePtr plane, |
| + uint32_t plane_id); |
| + |
| + ~HardwareDisplayPlane(); |
| + |
| + bool Initialize(); |
| + |
| + bool SetPlaneData(uint32_t crtc_id, |
| + uint32_t framebuffer, |
| + const gfx::Rect& crtc_rect, |
| + const gfx::Rect& src_rect); |
| + |
| + private: |
| + struct Property { |
| + Property(); |
| + bool Initialize(DriWrapper* drm, |
| + const char* name, |
| + drmModeObjectPropertiesPtr plane_properties); |
| + uint32_t id_; |
| + }; |
| + // Object containing the connection to the graphics device and wraps the API |
| + // calls to control it. |
| + DriWrapper* drm_; |
| + |
| + // Not owned. |
| + drmModePropertySetPtr property_set_; |
| + |
| + drmModePlanePtr plane_; |
|
dnicoara
2014/07/11 15:24:04
Please create a wrapper in scoped_drm_types.h and
alexst (slow to review)
2014/07/11 20:19:43
Done.
|
| + uint32_t plane_id_; |
| + |
| + Property crtc_prop_; |
| + Property fb_prop_; |
| + Property crtc_x_prop_; |
| + Property crtc_y_prop_; |
| + Property crtc_w_prop_; |
| + Property crtc_h_prop_; |
| + Property src_x_prop_; |
| + Property src_y_prop_; |
| + Property src_w_prop_; |
| + Property src_h_prop_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(HardwareDisplayPlane); |
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_PLANE_H_ |