Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: cc/output/overlay_candidates.h

Issue 197223003: Start of hardware overlay support in CC with Ubercompositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_ 5 #ifndef CC_OUTPUT_OVERLAY_CANDIDATES_H_
6 #define UI_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_ 6 #define CC_OUTPUT_OVERLAY_CANDIDATES_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/gfx_export.h" 11 #include "cc/base/cc_export.h"
12 #include "ui/gfx/ozone/surface_factory_ozone.h" 12 #include "cc/resources/resource_format.h"
13 #include "ui/gfx/rect_f.h" 13 #include "ui/gfx/geometry/rect.h"
14 14
15 namespace gfx { 15 namespace cc {
16 16
17 // This class can be used to answer questions about possible overlay 17 // This class that 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.
19 // class from SurfaceFactoryOzone given an AcceleratedWidget. 19 class CC_EXPORT OverlayCandidates {
enne (OOO) 2014/03/14 18:13:41 bikeshed: If it answers questions, maybe this is a
alexst (slow to review) 2014/03/14 19:54:22 This name is a result of bikeshedding elsewhere. :
20 class GFX_EXPORT OverlayCandidatesOzone {
21 public: 20 public:
21 enum OverlayTransform {
22 NONE,
23 FLIP_HORIZONTAL,
24 FLIP_VERTICAL,
25 ROTATE_90,
26 ROTATE_180,
27 ROTATE_270,
28 };
29
22 struct OverlaySurfaceCandidate { 30 struct OverlaySurfaceCandidate {
enne (OOO) 2014/03/14 18:13:41 Move this out to a separate file, to narrow visibi
23 OverlaySurfaceCandidate(); 31 OverlaySurfaceCandidate();
24 ~OverlaySurfaceCandidate(); 32 ~OverlaySurfaceCandidate();
25 33
26 // Transformation to apply to layer during composition. 34 // Transformation to apply to layer during composition.
27 SurfaceFactoryOzone::OverlayTransform transform; 35 OverlayTransform transform;
28 // Format of the buffer to composite. 36 // Format of the buffer to composite.
29 SurfaceFactoryOzone::BufferFormat format; 37 ResourceFormat format;
30 // Rect on the display to position the overlay to. 38 // Rect on the display to position the overlay to.
31 gfx::Rect display_rect; 39 gfx::Rect display_rect;
32 // Crop within the buffer to be placed inside |display_rect|. 40 // Crop within the buffer to be placed inside |display_rect|.
enne (OOO) 2014/03/14 18:13:41 Can you say that this is in uv space and not in pi
33 gfx::RectF crop_rect; 41 gfx::RectF crop_rect;
42 // Resource id of the buffer to present.
43 unsigned resource_id;
piman 2014/03/14 03:42:34 Will we need things like blending mode or somethin
alexst (slow to review) 2014/03/14 19:54:22 Yeah, I was going for a minimal subset and omitted
34 44
35 // To be modified by the implementer if this candidate can go into 45 // To be modified by the implementer if this candidate can go into
36 // an overlay. 46 // an overlay.
37 bool overlay_handled; 47 bool overlay_handled;
38 }; 48 };
39 49
40 typedef std::vector<OverlaySurfaceCandidate> OverlaySurfaceCandidateList; 50 typedef std::vector<OverlaySurfaceCandidate> OverlaySurfaceCandidateList;
41 51
42 // A list of possible overlay candidates is presented to this function. 52 // A list of possible overlay candidates is presented to this function.
43 // The expected result is that those candidates that can be in a separate 53 // The expected result is that those candidates that can be in a separate
44 // plane are marked with |overlay_handled| set to true, otherwise they are 54 // plane are marked with |overlay_handled| set to true, otherwise they are
45 // to be tranditionally composited. 55 // to be tranditionally composited.
enne (OOO) 2014/03/14 18:13:41 typo
alexst (slow to review) 2014/03/14 19:54:22 Done.
46 virtual void CheckOverlaySupport(OverlaySurfaceCandidateList* surfaces); 56 virtual void CheckOverlaySupport(OverlaySurfaceCandidateList* surfaces);
piman 2014/03/14 03:42:34 pure virtual?
alexst (slow to review) 2014/03/14 19:54:22 Done.
47 57
48 virtual ~OverlayCandidatesOzone(); 58 virtual ~OverlayCandidates();
49 }; 59 };
50 60
51 } // namespace gfx 61 } // namespace cc
52 62
53 #endif // UI_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_ 63 #endif // CC_OUTPUT_OVERLAY_CANDIDATES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698