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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 1430363002: List all child surfaces (including occluded) in CompositorFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/trees/layer_tree_impl.h ('k') | content/common/cc_messages.h » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 DCHECK(it != layers_with_copy_output_request_.end()); 1312 DCHECK(it != layers_with_copy_output_request_.end());
1313 layers_with_copy_output_request_.erase(it); 1313 layers_with_copy_output_request_.erase(it);
1314 1314
1315 // TODO(danakj): Remove this once crash is found crbug.com/309777 1315 // TODO(danakj): Remove this once crash is found crbug.com/309777
1316 for (size_t i = 0; i < layers_with_copy_output_request_.size(); ++i) { 1316 for (size_t i = 0; i < layers_with_copy_output_request_.size(); ++i) {
1317 CHECK(layers_with_copy_output_request_[i] != layer) 1317 CHECK(layers_with_copy_output_request_[i] != layer)
1318 << i << " of " << layers_with_copy_output_request_.size(); 1318 << i << " of " << layers_with_copy_output_request_.size();
1319 } 1319 }
1320 } 1320 }
1321 1321
1322 void LayerTreeImpl::AddSurfaceLayer(LayerImpl* layer) {
1323 DCHECK(std::find(surface_layers_.begin(), surface_layers_.end(), layer) ==
1324 surface_layers_.end());
1325 surface_layers_.push_back(layer);
1326 }
1327
1328 void LayerTreeImpl::RemoveSurfaceLayer(LayerImpl* layer) {
1329 std::vector<LayerImpl*>::iterator it =
1330 std::find(surface_layers_.begin(), surface_layers_.end(), layer);
1331 DCHECK(it != surface_layers_.end());
1332 surface_layers_.erase(it);
1333 }
1334
1322 const std::vector<LayerImpl*>& LayerTreeImpl::LayersWithCopyOutputRequest() 1335 const std::vector<LayerImpl*>& LayerTreeImpl::LayersWithCopyOutputRequest()
1323 const { 1336 const {
1324 // Only the active tree needs to know about layers with copy requests, as 1337 // Only the active tree needs to know about layers with copy requests, as
1325 // they are aborted if not serviced during draw. 1338 // they are aborted if not serviced during draw.
1326 DCHECK(IsActiveTree()); 1339 DCHECK(IsActiveTree());
1327 1340
1328 return layers_with_copy_output_request_; 1341 return layers_with_copy_output_request_;
1329 } 1342 }
1330 1343
1331 template <typename LayerType> 1344 template <typename LayerType>
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 const gfx::BoxF& box, 1944 const gfx::BoxF& box,
1932 gfx::BoxF* bounds) const { 1945 gfx::BoxF* bounds) const {
1933 *bounds = gfx::BoxF(); 1946 *bounds = gfx::BoxF();
1934 return layer_tree_host_impl_->animation_host() 1947 return layer_tree_host_impl_->animation_host()
1935 ? layer_tree_host_impl_->animation_host() 1948 ? layer_tree_host_impl_->animation_host()
1936 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) 1949 ->TransformAnimationBoundsForBox(layer->id(), box, bounds)
1937 : true; 1950 : true;
1938 } 1951 }
1939 1952
1940 } // namespace cc 1953 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | content/common/cc_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698