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/overlay_plane.h" | 5 #include "ui/ozone/platform/drm/gpu/overlay_plane.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" | 9 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 | 12 |
13 OverlayPlane::OverlayPlane(const scoped_refptr<ScanoutBuffer>& buffer) | 13 OverlayPlane::OverlayPlane(const scoped_refptr<ScanoutBuffer>& buffer) |
14 : buffer(buffer), | 14 : buffer(buffer), |
15 plane_transform(gfx::OVERLAY_TRANSFORM_INVALID), | 15 plane_transform(gfx::OVERLAY_TRANSFORM_INVALID), |
16 display_bounds(gfx::Point(), buffer->GetSize()), | 16 display_bounds(gfx::Point(), buffer->GetSize()), |
17 crop_rect(0, 0, 1, 1) {} | 17 crop_rect(0, 0, 1, 1) {} |
18 | 18 |
19 OverlayPlane::OverlayPlane(const scoped_refptr<ScanoutBuffer>& buffer, | 19 OverlayPlane::OverlayPlane(const scoped_refptr<ScanoutBuffer>& buffer, |
20 int z_order, | 20 int z_order, |
21 gfx::OverlayTransform plane_transform, | 21 gfx::OverlayTransform plane_transform, |
22 const gfx::Rect& display_bounds, | 22 const gfx::Rect& display_bounds, |
23 const gfx::RectF& crop_rect) | 23 const gfx::RectF& crop_rect) |
24 : buffer(buffer), | 24 : buffer(buffer), |
25 z_order(z_order), | 25 z_order(z_order), |
26 plane_transform(plane_transform), | 26 plane_transform(plane_transform), |
27 display_bounds(display_bounds), | 27 display_bounds(display_bounds), |
28 crop_rect(crop_rect) {} | 28 crop_rect(crop_rect) {} |
29 | 29 |
| 30 OverlayPlane::OverlayPlane(const OverlayPlane& other) = default; |
| 31 |
30 OverlayPlane::~OverlayPlane() { | 32 OverlayPlane::~OverlayPlane() { |
31 } | 33 } |
32 | 34 |
33 OverlayPlane::OverlayPlane(const scoped_refptr<ScanoutBuffer>& buffer, | 35 OverlayPlane::OverlayPlane(const scoped_refptr<ScanoutBuffer>& buffer, |
34 int z_order, | 36 int z_order, |
35 gfx::OverlayTransform plane_transform, | 37 gfx::OverlayTransform plane_transform, |
36 const gfx::Rect& display_bounds, | 38 const gfx::Rect& display_bounds, |
37 const gfx::RectF& crop_rect, | 39 const gfx::RectF& crop_rect, |
38 const ProcessBufferCallback& processing_callback) | 40 const ProcessBufferCallback& processing_callback) |
39 : buffer(buffer), | 41 : buffer(buffer), |
(...skipping 14 matching lines...) Expand all Loading... |
54 const OverlayPlaneList& overlays) { | 56 const OverlayPlaneList& overlays) { |
55 for (size_t i = 0; i < overlays.size(); ++i) { | 57 for (size_t i = 0; i < overlays.size(); ++i) { |
56 if (overlays[i].z_order == 0) | 58 if (overlays[i].z_order == 0) |
57 return &overlays[i]; | 59 return &overlays[i]; |
58 } | 60 } |
59 | 61 |
60 return nullptr; | 62 return nullptr; |
61 } | 63 } |
62 | 64 |
63 } // namespace ui | 65 } // namespace ui |
OLD | NEW |