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

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

Issue 208213003: Plumb overlay processing into DirectRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Exporting resources Created 6 years, 9 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 | Annotate | Revision Log
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/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
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);
102 101
103 // Contributing passes aggregated in to the pass list need to take the 102 // Contributing passes aggregated in to the pass list need to take the
104 // transform of the surface quad into account to update their transform to 103 // transform of the surface quad into account to update their transform to
105 // the root surface. 104 // the root surface.
106 // TODO(jamesr): Make sure this is sufficient for surfaces nested several 105 // TODO(jamesr): Make sure this is sufficient for surfaces nested several
107 // levels deep and add tests. 106 // levels deep and add tests.
108 copy_pass->transform_to_root_target.ConcatTransform( 107 copy_pass->transform_to_root_target.ConcatTransform(
109 surface_quad->quadTransform()); 108 surface_quad->quadTransform());
110 109
111 CopyQuadsToPass(source.quad_list, 110 CopyQuadsToPass(source.quad_list,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 const RenderPass& source = *source_pass_list[i]; 196 const RenderPass& source = *source_pass_list[i];
198 197
199 scoped_ptr<RenderPass> copy_pass(RenderPass::Create()); 198 scoped_ptr<RenderPass> copy_pass(RenderPass::Create());
200 199
201 RenderPass::Id remapped_pass_id = RemapPassId(source.id, surface_id); 200 RenderPass::Id remapped_pass_id = RemapPassId(source.id, surface_id);
202 201
203 copy_pass->SetAll(remapped_pass_id, 202 copy_pass->SetAll(remapped_pass_id,
204 source.output_rect, 203 source.output_rect,
205 source.damage_rect, 204 source.damage_rect,
206 source.transform_to_root_target, 205 source.transform_to_root_target,
207 source.has_transparent_background, 206 source.has_transparent_background);
208 source.overlay_state);
209 207
210 CopyQuadsToPass(source.quad_list, 208 CopyQuadsToPass(source.quad_list,
211 source.shared_quad_state_list, 209 source.shared_quad_state_list,
212 gfx::Transform(), 210 gfx::Transform(),
213 copy_pass.get(), 211 copy_pass.get(),
214 surface_id); 212 surface_id);
215 213
216 dest_pass_list_->push_back(copy_pass.Pass()); 214 dest_pass_list_->push_back(copy_pass.Pass());
217 } 215 }
218 } 216 }
(...skipping 24 matching lines...) Expand all
243 241
244 dest_pass_list_ = NULL; 242 dest_pass_list_ = NULL;
245 243
246 // TODO(jamesr): Aggregate all resource references into the returned frame's 244 // TODO(jamesr): Aggregate all resource references into the returned frame's
247 // resource list. 245 // resource list.
248 246
249 return frame.Pass(); 247 return frame.Pass();
250 } 248 }
251 249
252 } // namespace cc 250 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698