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

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

Issue 1110813002: Fix assert in GetOverlayRect when transforming video with Ozone overlay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some nits. Created 5 years, 7 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
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/overlay_candidate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "cc/resources/resource_format.h" 11 #include "cc/resources/resource_format.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/overlay_transform.h" 13 #include "ui/gfx/overlay_transform.h"
14 #include "ui/gfx/transform.h" 14 #include "ui/gfx/transform.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class CC_EXPORT OverlayCandidate { 18 class CC_EXPORT OverlayCandidate {
19 public: 19 public:
20 static gfx::OverlayTransform GetOverlayTransform( 20 static gfx::OverlayTransform GetOverlayTransform(
21 const gfx::Transform& quad_transform, 21 const gfx::Transform& quad_transform,
22 bool flipped); 22 bool flipped);
23 // Apply transform |delta| to |in| and return the resulting transform, 23 // Apply transform |delta| to |in| and return the resulting transform,
24 // or OVERLAY_TRANSFORM_INVALID. 24 // or OVERLAY_TRANSFORM_INVALID.
25 static gfx::OverlayTransform ModifyTransform(gfx::OverlayTransform in, 25 static gfx::OverlayTransform ModifyTransform(gfx::OverlayTransform in,
26 gfx::OverlayTransform delta); 26 gfx::OverlayTransform delta);
27 static gfx::Rect GetOverlayRect(const gfx::Transform& quad_transform, 27 static gfx::RectF GetOverlayRect(const gfx::Transform& quad_transform,
28 const gfx::Rect& rect); 28 const gfx::Rect& rect);
29 29
30 OverlayCandidate(); 30 OverlayCandidate();
31 ~OverlayCandidate(); 31 ~OverlayCandidate();
32 32
33 // Transformation to apply to layer during composition. 33 // Transformation to apply to layer during composition.
34 gfx::OverlayTransform transform; 34 gfx::OverlayTransform transform;
35 // Format of the buffer to composite. 35 // Format of the buffer to composite.
36 ResourceFormat format; 36 ResourceFormat format;
37 // Rect on the display to position the overlay to. 37 // Rect on the display to position the overlay to. Implementer must convert
38 gfx::Rect display_rect; 38 // to integer coordinates if setting |overlay_handled| to true.
39 gfx::RectF display_rect;
39 // Crop within the buffer to be placed inside |display_rect|. 40 // Crop within the buffer to be placed inside |display_rect|.
40 gfx::RectF uv_rect; 41 gfx::RectF uv_rect;
41 // Texture resource to present in an overlay. 42 // Texture resource to present in an overlay.
42 unsigned resource_id; 43 unsigned resource_id;
43 // Stacking order of the overlay plane relative to the main surface, 44 // Stacking order of the overlay plane relative to the main surface,
44 // which is 0. Signed to allow for "underlays". 45 // which is 0. Signed to allow for "underlays".
45 int plane_z_order; 46 int plane_z_order;
46 47
47 // To be modified by the implementer if this candidate can go into 48 // To be modified by the implementer if this candidate can go into
48 // an overlay. 49 // an overlay.
49 bool overlay_handled; 50 bool overlay_handled;
50 }; 51 };
51 52
52 typedef std::vector<OverlayCandidate> OverlayCandidateList; 53 typedef std::vector<OverlayCandidate> OverlayCandidateList;
53 54
54 } // namespace cc 55 } // namespace cc
55 56
56 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ 57 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/overlay_candidate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698