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

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

Issue 208213003: Plumb overlay processing into DirectRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Introduced ScopedExportLock 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 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 "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/resources/resource_format.h" 12 #include "cc/resources/resource_format.h"
13 #include "ui/gfx/geometry/rect.h" 13 #include "ui/gfx/geometry/rect.h"
14 #include "ui/gfx/transform.h"
14 15
15 namespace cc { 16 namespace cc {
16 17
17 struct CC_EXPORT OverlayCandidate { 18 class CC_EXPORT OverlayCandidate {
19 public:
18 enum OverlayTransform { 20 enum OverlayTransform {
21 INVALID,
19 NONE, 22 NONE,
20 FLIP_HORIZONTAL, 23 FLIP_HORIZONTAL,
21 FLIP_VERTICAL, 24 FLIP_VERTICAL,
22 ROTATE_90, 25 ROTATE_90,
23 ROTATE_180, 26 ROTATE_180,
24 ROTATE_270, 27 ROTATE_270,
25 }; 28 };
26 29
30 static OverlayTransform GetOverlayTransform(
31 const gfx::Transform& quad_transform,
32 bool flipped);
33 static gfx::Rect GetOverlayRect(const gfx::Transform& quad_transform,
34 const gfx::Rect& rect);
35
27 OverlayCandidate(); 36 OverlayCandidate();
28 ~OverlayCandidate(); 37 ~OverlayCandidate();
29 38
30 // Transformation to apply to layer during composition. 39 // Transformation to apply to layer during composition.
31 OverlayTransform transform; 40 OverlayTransform transform;
32 // Format of the buffer to composite. 41 // Format of the buffer to composite.
33 ResourceFormat format; 42 ResourceFormat format;
34 // Rect on the display to position the overlay to. 43 // Rect on the display to position the overlay to.
35 gfx::Rect display_rect; 44 gfx::Rect display_rect;
36 // Crop within the buffer to be placed inside |display_rect|. 45 // Crop within the buffer to be placed inside |display_rect|.
37 gfx::RectF uv_rect; 46 gfx::RectF uv_rect;
47 // Texture resource to present in an overlay.
48 unsigned resource_id;
49 // Stacking order of the overlay plane relative to the main surface,
50 // which is 0. Signed to allow for "underlays".
51 int plane_z_order;
38 52
39 // To be modified by the implementer if this candidate can go into 53 // To be modified by the implementer if this candidate can go into
40 // an overlay. 54 // an overlay.
41 bool overlay_handled; 55 bool overlay_handled;
42 }; 56 };
43 57
58 typedef std::vector<OverlayCandidate> OverlayCandidateList;
59
44 } // namespace cc 60 } // namespace cc
45 61
46 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ 62 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698