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 CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 5 #ifndef CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
6 #define CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 6 #define CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 static gfx::RectF GetOverlayRect(const gfx::Transform& quad_transform, | 27 static gfx::RectF GetOverlayRect(const gfx::Transform& quad_transform, |
28 const gfx::Rect& rect); | 28 const gfx::Rect& rect); |
29 | 29 |
30 OverlayCandidate(); | 30 OverlayCandidate(); |
31 ~OverlayCandidate(); | 31 ~OverlayCandidate(); |
32 | 32 |
33 // Transformation to apply to layer during composition. | 33 // Transformation to apply to layer during composition. |
34 gfx::OverlayTransform transform; | 34 gfx::OverlayTransform transform; |
35 // Format of the buffer to composite. | 35 // Format of the buffer to composite. |
36 ResourceFormat format; | 36 ResourceFormat format; |
| 37 // Size of the resource, in pixels. |
| 38 gfx::Size resource_size_in_pixels; |
37 // Rect on the display to position the overlay to. Implementer must convert | 39 // Rect on the display to position the overlay to. Implementer must convert |
38 // to integer coordinates if setting |overlay_handled| to true. | 40 // to integer coordinates if setting |overlay_handled| to true. |
39 gfx::RectF display_rect; | 41 gfx::RectF display_rect; |
40 // Crop within the buffer to be placed inside |display_rect|. | 42 // Crop within the buffer to be placed inside |display_rect|. |
41 gfx::RectF uv_rect; | 43 gfx::RectF uv_rect; |
42 // Texture resource to present in an overlay. | 44 // Texture resource to present in an overlay. |
43 unsigned resource_id; | 45 unsigned resource_id; |
44 // Stacking order of the overlay plane relative to the main surface, | 46 // Stacking order of the overlay plane relative to the main surface, |
45 // which is 0. Signed to allow for "underlays". | 47 // which is 0. Signed to allow for "underlays". |
46 int plane_z_order; | 48 int plane_z_order; |
47 | 49 |
48 // To be modified by the implementer if this candidate can go into | 50 // To be modified by the implementer if this candidate can go into |
49 // an overlay. | 51 // an overlay. |
50 bool overlay_handled; | 52 bool overlay_handled; |
51 }; | 53 }; |
52 | 54 |
53 typedef std::vector<OverlayCandidate> OverlayCandidateList; | 55 typedef std::vector<OverlayCandidate> OverlayCandidateList; |
54 | 56 |
55 } // namespace cc | 57 } // namespace cc |
56 | 58 |
57 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 59 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
OLD | NEW |