| 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 #ifndef UI_OZONE_PLATFORM_DRI_OVERLAY_PLANE_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_OVERLAY_PLANE_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_OVERLAY_PLANE_H_ | 6 #define UI_OZONE_PLATFORM_DRI_OVERLAY_PLANE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
| 12 #include "ui/gfx/overlay_transform.h" | 12 #include "ui/gfx/overlay_transform.h" |
| 13 #include "ui/ozone/ozone_export.h" |
| 13 | 14 |
| 14 namespace ui { | 15 namespace ui { |
| 15 | 16 |
| 16 class ScanoutBuffer; | 17 class ScanoutBuffer; |
| 17 | 18 |
| 18 struct OverlayPlane; | 19 struct OverlayPlane; |
| 19 typedef std::vector<OverlayPlane> OverlayPlaneList; | 20 typedef std::vector<OverlayPlane> OverlayPlaneList; |
| 20 | 21 |
| 21 struct OverlayPlane { | 22 struct OZONE_EXPORT OverlayPlane { |
| 22 // Simpler constructor for the primary plane. | 23 // Simpler constructor for the primary plane. |
| 23 explicit OverlayPlane(scoped_refptr<ScanoutBuffer> buffer); | 24 explicit OverlayPlane(scoped_refptr<ScanoutBuffer> buffer); |
| 24 | 25 |
| 25 OverlayPlane(scoped_refptr<ScanoutBuffer> buffer, | 26 OverlayPlane(scoped_refptr<ScanoutBuffer> buffer, |
| 26 int z_order, | 27 int z_order, |
| 27 gfx::OverlayTransform plane_transform, | 28 gfx::OverlayTransform plane_transform, |
| 28 const gfx::Rect& display_bounds, | 29 const gfx::Rect& display_bounds, |
| 29 const gfx::RectF& crop_rect); | 30 const gfx::RectF& crop_rect); |
| 30 | 31 |
| 31 ~OverlayPlane(); | 32 ~OverlayPlane(); |
| 32 | 33 |
| 33 // Returns the primary plane in |overlays|. | 34 // Returns the primary plane in |overlays|. |
| 34 static const OverlayPlane* GetPrimaryPlane(const OverlayPlaneList& overlays); | 35 static const OverlayPlane* GetPrimaryPlane(const OverlayPlaneList& overlays); |
| 35 | 36 |
| 36 scoped_refptr<ScanoutBuffer> buffer; | 37 scoped_refptr<ScanoutBuffer> buffer; |
| 37 int z_order; | 38 int z_order; |
| 38 gfx::OverlayTransform plane_transform; | 39 gfx::OverlayTransform plane_transform; |
| 39 gfx::Rect display_bounds; | 40 gfx::Rect display_bounds; |
| 40 gfx::RectF crop_rect; | 41 gfx::RectF crop_rect; |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 } // namespace ui | 44 } // namespace ui |
| 44 | 45 |
| 45 #endif // UI_OZONE_PLATFORM_DRI_OVERLAY_PLANE_H_ | 46 #endif // UI_OZONE_PLATFORM_DRI_OVERLAY_PLANE_H_ |
| OLD | NEW |