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

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

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years, 1 month 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_unittest.cc ('k') | cc/test/layer_tree_pixel_test.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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return allocator->Remap(surface_local_pass_id); 125 return allocator->Remap(surface_local_pass_id);
126 } 126 }
127 127
128 int SurfaceAggregator::ChildIdForSurface(Surface* surface) { 128 int SurfaceAggregator::ChildIdForSurface(Surface* surface) {
129 SurfaceToResourceChildIdMap::iterator it = 129 SurfaceToResourceChildIdMap::iterator it =
130 surface_id_to_resource_child_id_.find(surface->surface_id()); 130 surface_id_to_resource_child_id_.find(surface->surface_id());
131 if (it == surface_id_to_resource_child_id_.end()) { 131 if (it == surface_id_to_resource_child_id_.end()) {
132 int child_id = 132 int child_id =
133 provider_->CreateChild(base::Bind(&UnrefHelper, surface->factory())); 133 provider_->CreateChild(base::Bind(&UnrefHelper, surface->factory()));
134 if (surface->factory()) { 134 if (surface->factory()) {
135 provider_->SetChildNeedsSyncPoints( 135 provider_->SetChildNeedsSyncTokens(
136 child_id, surface->factory()->needs_sync_points()); 136 child_id, surface->factory()->needs_sync_points());
137 } 137 }
138 surface_id_to_resource_child_id_[surface->surface_id()] = child_id; 138 surface_id_to_resource_child_id_[surface->surface_id()] = child_id;
139 return child_id; 139 return child_id;
140 } else { 140 } else {
141 return it->second; 141 return it->second;
142 } 142 }
143 } 143 }
144 144
145 gfx::Rect SurfaceAggregator::DamageRectForSurface( 145 gfx::Rect SurfaceAggregator::DamageRectForSurface(
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 void SurfaceAggregator::SetFullDamageForSurface(SurfaceId surface_id) { 656 void SurfaceAggregator::SetFullDamageForSurface(SurfaceId surface_id) {
657 auto it = previous_contained_surfaces_.find(surface_id); 657 auto it = previous_contained_surfaces_.find(surface_id);
658 if (it == previous_contained_surfaces_.end()) 658 if (it == previous_contained_surfaces_.end())
659 return; 659 return;
660 // Set the last drawn index as 0 to ensure full damage next time it's drawn. 660 // Set the last drawn index as 0 to ensure full damage next time it's drawn.
661 it->second = 0; 661 it->second = 0;
662 } 662 }
663 663
664 } // namespace cc 664 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater_unittest.cc ('k') | cc/test/layer_tree_pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698