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

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

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 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
« no previous file with comments | « cc/resources/video_resource_updater.h ('k') | cc/surfaces/surface_aggregator_unittest.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 <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
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, &copy_requests, &copy_pass->copy_requests); 249 MoveMatchingRequests(source.id, &copy_requests, &copy_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
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
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater.h ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698