OLD | NEW |
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 <map> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
11 #include "cc/base/resource_id.h" | 12 #include "cc/base/resource_id.h" |
12 #include "cc/quads/render_pass.h" | 13 #include "cc/quads/render_pass.h" |
13 #include "cc/resources/resource_format.h" | 14 #include "cc/resources/resource_format.h" |
14 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
15 #include "ui/gfx/geometry/rect_f.h" | 16 #include "ui/gfx/geometry/rect_f.h" |
16 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
17 #include "ui/gfx/overlay_transform.h" | 18 #include "ui/gfx/overlay_transform.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 class CC_EXPORT OverlayCandidateList : public std::vector<OverlayCandidate> { | 108 class CC_EXPORT OverlayCandidateList : public std::vector<OverlayCandidate> { |
108 public: | 109 public: |
109 OverlayCandidateList(); | 110 OverlayCandidateList(); |
110 OverlayCandidateList(const OverlayCandidateList&); | 111 OverlayCandidateList(const OverlayCandidateList&); |
111 OverlayCandidateList(OverlayCandidateList&&); | 112 OverlayCandidateList(OverlayCandidateList&&); |
112 ~OverlayCandidateList(); | 113 ~OverlayCandidateList(); |
113 | 114 |
114 OverlayCandidateList& operator=(const OverlayCandidateList&); | 115 OverlayCandidateList& operator=(const OverlayCandidateList&); |
115 OverlayCandidateList& operator=(OverlayCandidateList&&); | 116 OverlayCandidateList& operator=(OverlayCandidateList&&); |
116 | 117 |
| 118 // [id] == origin of candidate's |display_rect| for all promotable resources. |
| 119 using PromotionHintInfoMap = std::map<ResourceId, gfx::PointF>; |
| 120 |
117 // For android, this provides a set of resources that could be promoted to | 121 // For android, this provides a set of resources that could be promoted to |
118 // overlay, if one backs them with a SurfaceView. | 122 // overlay, if one backs them with a SurfaceView. |
119 ResourceIdSet promotable_resource_hints_; | 123 PromotionHintInfoMap promotion_hint_info_map_; |
| 124 |
| 125 // Helper to insert |candidate| into |promotion_hint_info_|. |
| 126 void AddPromotionHint(const OverlayCandidate& candidate); |
120 }; | 127 }; |
121 | 128 |
122 } // namespace cc | 129 } // namespace cc |
123 | 130 |
124 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 131 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
OLD | NEW |