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 <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 source.output_rect, | 244 source.output_rect, |
245 source.damage_rect, | 245 source.damage_rect, |
246 source.transform_to_root_target, | 246 source.transform_to_root_target, |
247 source.has_transparent_background); | 247 source.has_transparent_background); |
248 | 248 |
249 MoveMatchingRequests(source.id, ©_requests, ©_pass->copy_requests); | 249 MoveMatchingRequests(source.id, ©_requests, ©_pass->copy_requests); |
250 | 250 |
251 // Contributing passes aggregated in to the pass list need to take the | 251 // Contributing passes aggregated in to the pass list need to take the |
252 // transform of the surface quad into account to update their transform to | 252 // transform of the surface quad into account to update their transform to |
253 // the root surface. | 253 // the root surface. |
254 // TODO(jamesr): Make sure this is sufficient for surfaces nested several | |
255 // levels deep and add tests. | |
256 copy_pass->transform_to_root_target.ConcatTransform( | 254 copy_pass->transform_to_root_target.ConcatTransform( |
257 surface_quad->quadTransform()); | 255 surface_quad->quadTransform()); |
258 copy_pass->transform_to_root_target.ConcatTransform( | 256 copy_pass->transform_to_root_target.ConcatTransform( |
259 content_to_target_transform); | 257 content_to_target_transform); |
| 258 copy_pass->transform_to_root_target.ConcatTransform( |
| 259 dest_pass->transform_to_root_target); |
260 | 260 |
261 CopyQuadsToPass(source.quad_list, source.shared_quad_state_list, | 261 CopyQuadsToPass(source.quad_list, source.shared_quad_state_list, |
262 gfx::Transform(), ClipData(), copy_pass.get(), surface_id); | 262 gfx::Transform(), ClipData(), copy_pass.get(), surface_id); |
263 | 263 |
264 dest_pass_list_->push_back(copy_pass.Pass()); | 264 dest_pass_list_->push_back(copy_pass.Pass()); |
265 } | 265 } |
266 | 266 |
267 const RenderPass& last_pass = *render_pass_list.back(); | 267 const RenderPass& last_pass = *render_pass_list.back(); |
268 if (merge_pass) { | 268 if (merge_pass) { |
269 // TODO(jamesr): Clean up last pass special casing. | 269 // TODO(jamesr): Clean up last pass special casing. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 void SurfaceAggregator::ReleaseResources(SurfaceId surface_id) { | 490 void SurfaceAggregator::ReleaseResources(SurfaceId surface_id) { |
491 SurfaceToResourceChildIdMap::iterator it = | 491 SurfaceToResourceChildIdMap::iterator it = |
492 surface_id_to_resource_child_id_.find(surface_id); | 492 surface_id_to_resource_child_id_.find(surface_id); |
493 if (it != surface_id_to_resource_child_id_.end()) { | 493 if (it != surface_id_to_resource_child_id_.end()) { |
494 provider_->DestroyChild(it->second); | 494 provider_->DestroyChild(it->second); |
495 surface_id_to_resource_child_id_.erase(it); | 495 surface_id_to_resource_child_id_.erase(it); |
496 } | 496 } |
497 } | 497 } |
498 | 498 |
499 } // namespace cc | 499 } // namespace cc |
OLD | NEW |