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
3 // found in the LICENSE file.
5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_OVERLAY_PLANE_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_OVERLAY_PLANE_H_
10 #include "base/memory/ref_counted.h"
11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/overlay_transform.h"
13 #include "ui/ozone/ozone_export.h"
20 typedef std::vector
<OverlayPlane
> OverlayPlaneList
;
22 struct OZONE_EXPORT OverlayPlane
{
23 // Simpler constructor for the primary plane.
24 explicit OverlayPlane(scoped_refptr
<ScanoutBuffer
> buffer
);
26 OverlayPlane(scoped_refptr
<ScanoutBuffer
> buffer
,
28 gfx::OverlayTransform plane_transform
,
29 const gfx::Rect
& display_bounds
,
30 const gfx::RectF
& crop_rect
);
34 // Returns the primary plane in |overlays|.
35 static const OverlayPlane
* GetPrimaryPlane(const OverlayPlaneList
& overlays
);
37 scoped_refptr
<ScanoutBuffer
> buffer
;
39 gfx::OverlayTransform plane_transform
;
40 gfx::Rect display_bounds
;
46 #endif // UI_OZONE_PLATFORM_DRM_GPU_OVERLAY_PLANE_H_