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

Side by Side Diff: cc/surfaces/surface_aggregator.cc

Issue 380893004: Move Copy method from DrawQuad to RenderPass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moreRP4DQ
Patch Set: rebase Created 6 years, 5 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/quads/render_pass_draw_quad.cc ('k') | no next file » | 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 #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
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
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
OLDNEW
« no previous file with comments | « cc/quads/render_pass_draw_quad.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698