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 #include "cc/surfaces/surface_aggregator.h" | 5 #include "cc/surfaces/surface_aggregator.h" |
6 | 6 |
7 #include "base/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/output/delegated_frame_data.h" | 10 #include "cc/output/delegated_frame_data.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 const RenderPass& source = *referenced_passes[j]; | 90 const RenderPass& source = *referenced_passes[j]; |
91 | 91 |
92 scoped_ptr<RenderPass> copy_pass(RenderPass::Create()); | 92 scoped_ptr<RenderPass> copy_pass(RenderPass::Create()); |
93 | 93 |
94 RenderPass::Id remapped_pass_id = RemapPassId(source.id, surface_id); | 94 RenderPass::Id remapped_pass_id = RemapPassId(source.id, surface_id); |
95 | 95 |
96 copy_pass->SetAll(remapped_pass_id, | 96 copy_pass->SetAll(remapped_pass_id, |
97 source.output_rect, | 97 source.output_rect, |
98 source.damage_rect, | 98 source.damage_rect, |
99 source.transform_to_root_target, | 99 source.transform_to_root_target, |
100 source.has_transparent_background); | 100 source.has_transparent_background, |
| 101 source.overlay_state); |
101 | 102 |
102 // Contributing passes aggregated in to the pass list need to take the | 103 // Contributing passes aggregated in to the pass list need to take the |
103 // transform of the surface quad into account to update their transform to | 104 // transform of the surface quad into account to update their transform to |
104 // the root surface. | 105 // the root surface. |
105 // TODO(jamesr): Make sure this is sufficient for surfaces nested several | 106 // TODO(jamesr): Make sure this is sufficient for surfaces nested several |
106 // levels deep and add tests. | 107 // levels deep and add tests. |
107 copy_pass->transform_to_root_target.ConcatTransform( | 108 copy_pass->transform_to_root_target.ConcatTransform( |
108 surface_quad->quadTransform()); | 109 surface_quad->quadTransform()); |
109 | 110 |
110 CopyQuadsToPass(source.quad_list, | 111 CopyQuadsToPass(source.quad_list, |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 const RenderPass& source = *source_pass_list[i]; | 197 const RenderPass& source = *source_pass_list[i]; |
197 | 198 |
198 scoped_ptr<RenderPass> copy_pass(RenderPass::Create()); | 199 scoped_ptr<RenderPass> copy_pass(RenderPass::Create()); |
199 | 200 |
200 RenderPass::Id remapped_pass_id = RemapPassId(source.id, surface_id); | 201 RenderPass::Id remapped_pass_id = RemapPassId(source.id, surface_id); |
201 | 202 |
202 copy_pass->SetAll(remapped_pass_id, | 203 copy_pass->SetAll(remapped_pass_id, |
203 source.output_rect, | 204 source.output_rect, |
204 source.damage_rect, | 205 source.damage_rect, |
205 source.transform_to_root_target, | 206 source.transform_to_root_target, |
206 source.has_transparent_background); | 207 source.has_transparent_background, |
| 208 source.overlay_state); |
207 | 209 |
208 CopyQuadsToPass(source.quad_list, | 210 CopyQuadsToPass(source.quad_list, |
209 source.shared_quad_state_list, | 211 source.shared_quad_state_list, |
210 gfx::Transform(), | 212 gfx::Transform(), |
211 copy_pass.get(), | 213 copy_pass.get(), |
212 surface_id); | 214 surface_id); |
213 | 215 |
214 dest_pass_list_->push_back(copy_pass.Pass()); | 216 dest_pass_list_->push_back(copy_pass.Pass()); |
215 } | 217 } |
216 } | 218 } |
(...skipping 24 matching lines...) Expand all Loading... |
241 | 243 |
242 dest_pass_list_ = NULL; | 244 dest_pass_list_ = NULL; |
243 | 245 |
244 // TODO(jamesr): Aggregate all resource references into the returned frame's | 246 // TODO(jamesr): Aggregate all resource references into the returned frame's |
245 // resource list. | 247 // resource list. |
246 | 248 |
247 return frame.Pass(); | 249 return frame.Pass(); |
248 } | 250 } |
249 | 251 |
250 } // namespace cc | 252 } // namespace cc |
OLD | NEW |