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

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

Issue 197223003: Start of hardware overlay support in CC with Ubercompositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « cc/resources/texture_mailbox.cc ('k') | content/common/cc_messages.cc » ('j') | 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/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);
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
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
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
OLDNEW
« no previous file with comments | « cc/resources/texture_mailbox.cc ('k') | content/common/cc_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698