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_PUBLIC_OVERLAY_CANDIDATES_OZONE_H_ | 5 #ifndef UI_OZONE_PUBLIC_OVERLAY_CANDIDATES_OZONE_H_ |
6 #define UI_OZONE_PUBLIC_OVERLAY_CANDIDATES_OZONE_H_ | 6 #define UI_OZONE_PUBLIC_OVERLAY_CANDIDATES_OZONE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "ui/gfx/geometry/rect_f.h" | 11 #include "ui/gfx/geometry/rect_f.h" |
12 #include "ui/ozone/ozone_base_export.h" | 12 #include "ui/ozone/ozone_base_export.h" |
13 #include "ui/ozone/public/surface_factory_ozone.h" | 13 #include "ui/ozone/public/surface_factory_ozone.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 // This class can be used to answer questions about possible overlay | 17 // This class can be used to answer questions about possible overlay |
18 // configurations for a particular output device. We get an instance of this | 18 // configurations for a particular output device. We get an instance of this |
19 // class from SurfaceFactoryOzone given an AcceleratedWidget. | 19 // class from SurfaceFactoryOzone given an AcceleratedWidget. |
20 class OZONE_BASE_EXPORT OverlayCandidatesOzone { | 20 class OZONE_BASE_EXPORT OverlayCandidatesOzone { |
21 public: | 21 public: |
22 struct OverlaySurfaceCandidate { | 22 struct OverlaySurfaceCandidate { |
23 OverlaySurfaceCandidate(); | 23 OverlaySurfaceCandidate(); |
24 ~OverlaySurfaceCandidate(); | 24 ~OverlaySurfaceCandidate(); |
25 | 25 |
26 // Transformation to apply to layer during composition. | 26 // Transformation to apply to layer during composition. |
27 gfx::OverlayTransform transform; | 27 gfx::OverlayTransform transform; |
28 // Format of the buffer to composite. | 28 // Format of the buffer to composite. |
29 SurfaceFactoryOzone::BufferFormat format; | 29 SurfaceFactoryOzone::BufferFormat format; |
| 30 // Size of the buffer, in pixels. |
| 31 gfx::Size buffer_size; |
30 // Rect on the display to position the overlay to. Input rectangle may | 32 // Rect on the display to position the overlay to. Input rectangle may |
31 // not have integer coordinates, but when accepting for overlay, must | 33 // not have integer coordinates, but when accepting for overlay, must |
32 // be modified by CheckOverlaySupport to output integer values. | 34 // be modified by CheckOverlaySupport to output integer values. |
33 gfx::RectF display_rect; | 35 gfx::RectF display_rect; |
34 // Crop within the buffer to be placed inside |display_rect|. | 36 // Crop within the buffer to be placed inside |display_rect|. |
35 gfx::RectF crop_rect; | 37 gfx::RectF crop_rect; |
36 // Stacking order of the overlay plane relative to the main surface, | 38 // Stacking order of the overlay plane relative to the main surface, |
37 // which is 0. Signed to allow for "underlays". | 39 // which is 0. Signed to allow for "underlays". |
38 int plane_z_order; | 40 int plane_z_order; |
39 | 41 |
(...skipping 11 matching lines...) Expand all Loading... |
51 // the implementation must also snap |display_rect| to integer coordinates | 53 // the implementation must also snap |display_rect| to integer coordinates |
52 // if necessary. | 54 // if necessary. |
53 virtual void CheckOverlaySupport(OverlaySurfaceCandidateList* surfaces); | 55 virtual void CheckOverlaySupport(OverlaySurfaceCandidateList* surfaces); |
54 | 56 |
55 virtual ~OverlayCandidatesOzone(); | 57 virtual ~OverlayCandidatesOzone(); |
56 }; | 58 }; |
57 | 59 |
58 } // namespace ui | 60 } // namespace ui |
59 | 61 |
60 #endif // UI_OZONE_PUBLIC_OVERLAY_CANDIDATES_OZONE_H_ | 62 #endif // UI_OZONE_PUBLIC_OVERLAY_CANDIDATES_OZONE_H_ |
OLD | NEW |