| 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->ForceRenderSurface() || |
| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 | 671 |
| 671 PropertyTrees* GetPropertyTrees(Layer* layer) { | 672 PropertyTrees* GetPropertyTrees(Layer* layer) { |
| 672 return layer->layer_tree_host()->property_trees(); | 673 return layer->layer_tree_host()->property_trees(); |
| 673 } | 674 } |
| 674 | 675 |
| 675 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { | 676 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { |
| 676 return layer->layer_tree_impl()->property_trees(); | 677 return layer->layer_tree_impl()->property_trees(); |
| 677 } | 678 } |
| 678 | 679 |
| 679 } // namespace cc | 680 } // namespace cc |
| OLD | NEW |