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

Side by Side Diff: ui/gfx/ozone/overlay_candidates_ozone.h

Issue 183723003: Overlay interface for ozone. (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
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/ozone/overlay_candidates_ozone.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 can be used to answer questions about possible overlay
18 // configurations for a particular output device. We get an instance of this
19 // class from SurfaceFactoryOzone given an AcceleratedWidget.
20 class GFX_EXPORT OverlayCandidatesOzone {
21 public:
22 struct OverlaySurfaceCandidate {
23 OverlaySurfaceCandidate();
24 ~OverlaySurfaceCandidate();
25
26 // Transformation to apply to layer during composition.
27 SurfaceFactoryOzone::OverlayTransform transform;
28 // Format of the buffer to composite.
29 SurfaceFactoryOzone::BufferFormat format;
30 // Rect on the display to position the overlay to.
31 gfx::Rect display_rect;
32 // Crop within the buffer to be placed inside |display_rect|.
33 gfx::RectF crop_rect;
34
35 // To be modified by the implementer if this candidate can go into
36 // an overlay.
37 bool overlay_handled;
38 };
39
40 typedef std::vector<OverlaySurfaceCandidate> OverlaySurfaceCandidateList;
41
42 // 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
44 // plane are marked with |overlay_handled| set to true, otherwise they are
45 // to be tranditionally composited.
46 virtual void CheckOverlaySupport(OverlaySurfaceCandidateList* surfaces);
47
48 virtual ~OverlayCandidatesOzone();
49 };
50
51 } // namespace gfx
52
53 #endif // UI_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_
OLDNEW
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/ozone/overlay_candidates_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698