OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2012 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. | |
4 | |
5 #ifndef UI_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_ | |
6 #define UI_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "ui/gfx/gfx_export.h" | |
12 #include "ui/gfx/ozone/surface_factory_ozone.h" | |
13 #include "ui/gfx/rect_f.h" | |
14 | |
15 namespace gfx { | |
16 | |
17 // This class that can be used to answer questions about possible overlay | |
18 // configurations for a particular output device. | |
19 class GFX_EXPORT OverlayCandidatesOzone { | |
20 public: | |
21 struct OverlaySurfaceCandidate { | |
22 OverlaySurfaceCandidate(); | |
23 ~OverlaySurfaceCandidate(); | |
24 | |
25 // Transformation to apply to layer during composition. | |
26 SurfaceFactoryOzone::OverlayTransform transform; | |
27 // Format of the buffer to composite. | |
28 SurfaceFactoryOzone::BufferFormat format; | |
29 // Rect on the display to position the overlay to. | |
30 gfx::Rect display_rect; | |
rjkroege
2014/02/28 23:02:47
if these are not the same, how should the hardware
alexst (slow to review)
2014/03/03 18:36:24
Like texturing in GL, you put the crop rect from t
| |
31 // Crop within the buffer. | |
32 gfx::RectF crop_rect; | |
33 | |
34 // To be modified by the implementer if this candidate can go into | |
35 // an overlay. | |
36 bool overlay_handled; | |
37 }; | |
38 | |
39 typedef std::vector<OverlaySurfaceCandidate> OverlaySurfaceCandidateList; | |
40 | |
41 // A list of possible overlay candidates is presented to this function. | |
42 // The expected result is that those candidates that can be in a separate | |
43 // plane are marked with |overlay_handled| set to true, otherwise they are | |
44 // to be tranditionally composited. | |
45 virtual void CheckOverlaySupport(OverlaySurfaceCandidateList* surfaces); | |
46 | |
47 virtual ~OverlayCandidatesOzone(); | |
48 }; | |
49 | |
50 } // namespace gfx | |
51 | |
52 #endif // UI_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_ | |
OLD | NEW |