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

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

Issue 2017263002: cc: Move copy requests from layers to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in comment Created 4 years, 6 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/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_common_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 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_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 draw_property_utils::ComputeSurfaceDrawProperties(property_trees, 370 draw_property_utils::ComputeSurfaceDrawProperties(property_trees,
371 surface); 371 surface);
372 372
373 // Ignore occlusion from outside the surface when surface contents need to 373 // Ignore occlusion from outside the surface when surface contents need to
374 // be fully drawn. Layers with copy-request need to be complete. We could 374 // be fully drawn. Layers with copy-request need to be complete. We could
375 // be smarter about layers with replica and exclude regions where both 375 // be smarter about layers with replica and exclude regions where both
376 // layer and the replica are occluded, but this seems like overkill. The 376 // layer and the replica are occluded, but this seems like overkill. The
377 // same is true for layers with filters that move pixels. 377 // same is true for layers with filters that move pixels.
378 // TODO(senorblanco): make this smarter for the SkImageFilter case (check 378 // TODO(senorblanco): make this smarter for the SkImageFilter case (check
379 // for pixel-moving filters) 379 // for pixel-moving filters)
380 bool is_occlusion_immune = layer->HasCopyRequest() || 380 bool is_occlusion_immune = surface->HasCopyRequest() ||
381 layer->has_replica() || 381 layer->has_replica() ||
382 layer->filters().HasReferenceFilter() || 382 layer->filters().HasReferenceFilter() ||
383 layer->filters().HasFilterThatMovesPixels(); 383 layer->filters().HasFilterThatMovesPixels();
384 if (is_occlusion_immune) { 384 if (is_occlusion_immune) {
385 surface->SetNearestOcclusionImmuneAncestor(surface); 385 surface->SetNearestOcclusionImmuneAncestor(surface);
386 } else if (is_root) { 386 } else if (is_root) {
387 surface->SetNearestOcclusionImmuneAncestor(nullptr); 387 surface->SetNearestOcclusionImmuneAncestor(nullptr);
388 } else { 388 } else {
389 surface->SetNearestOcclusionImmuneAncestor( 389 surface->SetNearestOcclusionImmuneAncestor(
390 surface->render_target()->nearest_occlusion_immune_ancestor()); 390 surface->render_target()->nearest_occlusion_immune_ancestor());
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 704
705 PropertyTrees* GetPropertyTrees(Layer* layer) { 705 PropertyTrees* GetPropertyTrees(Layer* layer) {
706 return layer->layer_tree_host()->property_trees(); 706 return layer->layer_tree_host()->property_trees();
707 } 707 }
708 708
709 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 709 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
710 return layer->layer_tree_impl()->property_trees(); 710 return layer->layer_tree_impl()->property_trees();
711 } 711 }
712 712
713 } // namespace cc 713 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698