OLD | NEW |
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 300 |
301 // Ignore occlusion from outside the surface when surface contents need to be | 301 // Ignore occlusion from outside the surface when surface contents need to be |
302 // fully drawn. Layers with copy-request need to be complete. We could be | 302 // fully drawn. Layers with copy-request need to be complete. We could be |
303 // smarter about layers with filters that move pixels and exclude regions | 303 // smarter about layers with filters that move pixels and exclude regions |
304 // where both layers and the filters are occluded, but this seems like | 304 // where both layers and the filters are occluded, but this seems like |
305 // overkill. | 305 // overkill. |
306 // TODO(senorblanco): make this smarter for the SkImageFilter case (check for | 306 // TODO(senorblanco): make this smarter for the SkImageFilter case (check for |
307 // pixel-moving filters) | 307 // pixel-moving filters) |
308 const FilterOperations& filters = render_surface->Filters(); | 308 const FilterOperations& filters = render_surface->Filters(); |
309 bool is_occlusion_immune = render_surface->HasCopyRequest() || | 309 bool is_occlusion_immune = render_surface->HasCopyRequest() || |
| 310 render_surface->CacheRenderSurface() || |
310 filters.HasReferenceFilter() || | 311 filters.HasReferenceFilter() || |
311 filters.HasFilterThatMovesPixels(); | 312 filters.HasFilterThatMovesPixels(); |
312 if (is_occlusion_immune) { | 313 if (is_occlusion_immune) { |
313 render_surface->SetNearestOcclusionImmuneAncestor(render_surface); | 314 render_surface->SetNearestOcclusionImmuneAncestor(render_surface); |
314 } else if (is_root) { | 315 } else if (is_root) { |
315 render_surface->SetNearestOcclusionImmuneAncestor(nullptr); | 316 render_surface->SetNearestOcclusionImmuneAncestor(nullptr); |
316 } else { | 317 } else { |
317 render_surface->SetNearestOcclusionImmuneAncestor( | 318 render_surface->SetNearestOcclusionImmuneAncestor( |
318 render_surface->render_target()->nearest_occlusion_immune_ancestor()); | 319 render_surface->render_target()->nearest_occlusion_immune_ancestor()); |
319 } | 320 } |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 677 |
677 PropertyTrees* GetPropertyTrees(Layer* layer) { | 678 PropertyTrees* GetPropertyTrees(Layer* layer) { |
678 return layer->layer_tree_host()->property_trees(); | 679 return layer->layer_tree_host()->property_trees(); |
679 } | 680 } |
680 | 681 |
681 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { | 682 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { |
682 return layer->layer_tree_impl()->property_trees(); | 683 return layer->layer_tree_impl()->property_trees(); |
683 } | 684 } |
684 | 685 |
685 } // namespace cc | 686 } // namespace cc |
OLD | NEW |