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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 297 |
298 // Ignore occlusion from outside the surface when surface contents need to be | 298 // Ignore occlusion from outside the surface when surface contents need to be |
299 // fully drawn. Layers with copy-request need to be complete. We could be | 299 // fully drawn. Layers with copy-request need to be complete. We could be |
300 // smarter about layers with filters that move pixels and exclude regions | 300 // smarter about layers with filters that move pixels and exclude regions |
301 // where both layers and the filters are occluded, but this seems like | 301 // where both layers and the filters are occluded, but this seems like |
302 // overkill. | 302 // overkill. |
303 // TODO(senorblanco): make this smarter for the SkImageFilter case (check for | 303 // TODO(senorblanco): make this smarter for the SkImageFilter case (check for |
304 // pixel-moving filters) | 304 // pixel-moving filters) |
305 const FilterOperations& filters = render_surface->Filters(); | 305 const FilterOperations& filters = render_surface->Filters(); |
306 bool is_occlusion_immune = render_surface->HasCopyRequest() || | 306 bool is_occlusion_immune = render_surface->HasCopyRequest() || |
| 307 render_surface->CacheRenderSurface() || |
307 filters.HasReferenceFilter() || | 308 filters.HasReferenceFilter() || |
308 filters.HasFilterThatMovesPixels(); | 309 filters.HasFilterThatMovesPixels(); |
309 if (is_occlusion_immune) { | 310 if (is_occlusion_immune) { |
310 render_surface->SetNearestOcclusionImmuneAncestor(render_surface); | 311 render_surface->SetNearestOcclusionImmuneAncestor(render_surface); |
311 } else if (is_root) { | 312 } else if (is_root) { |
312 render_surface->SetNearestOcclusionImmuneAncestor(nullptr); | 313 render_surface->SetNearestOcclusionImmuneAncestor(nullptr); |
313 } else { | 314 } else { |
314 render_surface->SetNearestOcclusionImmuneAncestor( | 315 render_surface->SetNearestOcclusionImmuneAncestor( |
315 render_surface->render_target()->nearest_occlusion_immune_ancestor()); | 316 render_surface->render_target()->nearest_occlusion_immune_ancestor()); |
316 } | 317 } |
(...skipping 359 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 |