| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 quad->shared_quad_state, content_to_target_transform, dest_pass); | 241 quad->shared_quad_state, content_to_target_transform, dest_pass); |
| 242 last_copied_source_shared_quad_state = quad->shared_quad_state; | 242 last_copied_source_shared_quad_state = quad->shared_quad_state; |
| 243 } | 243 } |
| 244 if (quad->material == DrawQuad::RENDER_PASS) { | 244 if (quad->material == DrawQuad::RENDER_PASS) { |
| 245 const RenderPassDrawQuad* pass_quad = | 245 const RenderPassDrawQuad* pass_quad = |
| 246 RenderPassDrawQuad::MaterialCast(quad); | 246 RenderPassDrawQuad::MaterialCast(quad); |
| 247 RenderPass::Id original_pass_id = pass_quad->render_pass_id; | 247 RenderPass::Id original_pass_id = pass_quad->render_pass_id; |
| 248 RenderPass::Id remapped_pass_id = | 248 RenderPass::Id remapped_pass_id = |
| 249 RemapPassId(original_pass_id, surface_id); | 249 RemapPassId(original_pass_id, surface_id); |
| 250 | 250 |
| 251 dest_pass->quad_list.push_back( | 251 dest_pass->CopyFromAndAppendRenderPassDrawQuad( |
| 252 pass_quad->Copy(dest_pass->shared_quad_state_list.back(), | 252 pass_quad, |
| 253 remapped_pass_id).PassAs<DrawQuad>()); | 253 dest_pass->shared_quad_state_list.back(), |
| 254 remapped_pass_id); |
| 254 } else { | 255 } else { |
| 255 dest_pass->quad_list.push_back( | 256 dest_pass->CopyFromAndAppendDrawQuad( |
| 256 quad->Copy(dest_pass->shared_quad_state_list.back())); | 257 quad, dest_pass->shared_quad_state_list.back()); |
| 257 } | 258 } |
| 258 } | 259 } |
| 259 } | 260 } |
| 260 } | 261 } |
| 261 | 262 |
| 262 void SurfaceAggregator::CopyPasses(const RenderPassList& source_pass_list, | 263 void SurfaceAggregator::CopyPasses(const RenderPassList& source_pass_list, |
| 263 SurfaceId surface_id) { | 264 SurfaceId surface_id) { |
| 264 for (size_t i = 0; i < source_pass_list.size(); ++i) { | 265 for (size_t i = 0; i < source_pass_list.size(); ++i) { |
| 265 const RenderPass& source = *source_pass_list[i]; | 266 const RenderPass& source = *source_pass_list[i]; |
| 266 | 267 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 317 |
| 317 dest_pass_list_ = NULL; | 318 dest_pass_list_ = NULL; |
| 318 | 319 |
| 319 // TODO(jamesr): Aggregate all resource references into the returned frame's | 320 // TODO(jamesr): Aggregate all resource references into the returned frame's |
| 320 // resource list. | 321 // resource list. |
| 321 | 322 |
| 322 return frame.Pass(); | 323 return frame.Pass(); |
| 323 } | 324 } |
| 324 | 325 |
| 325 } // namespace cc | 326 } // namespace cc |
| OLD | NEW |