| 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_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" | 
| 6 | 6 | 
| 7 #include <stddef.h> | 7 #include <stddef.h> | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <algorithm> | 10 #include <algorithm> | 
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1025         const RenderSurfaceImpl* occlusion_surface = | 1025         const RenderSurfaceImpl* occlusion_surface = | 
| 1026             occlusion_tracker.OcclusionSurfaceForContributingSurface(); | 1026             occlusion_tracker.OcclusionSurfaceForContributingSurface(); | 
| 1027         gfx::Transform draw_transform; | 1027         gfx::Transform draw_transform; | 
| 1028         if (occlusion_surface) { | 1028         if (occlusion_surface) { | 
| 1029           // We are calculating transform between two render surfaces. So, we | 1029           // We are calculating transform between two render surfaces. So, we | 
| 1030           // need to apply the surface contents scale at target and remove the | 1030           // need to apply the surface contents scale at target and remove the | 
| 1031           // surface contents scale at source. | 1031           // surface contents scale at source. | 
| 1032           property_trees()->ComputeTransformToTarget( | 1032           property_trees()->ComputeTransformToTarget( | 
| 1033               it->render_surface()->TransformTreeIndex(), | 1033               it->render_surface()->TransformTreeIndex(), | 
| 1034               occlusion_surface->EffectTreeIndex(), &draw_transform); | 1034               occlusion_surface->EffectTreeIndex(), &draw_transform); | 
| 1035           // We don't have to apply surface contents scale when target is root. | 1035           const EffectNode* occlusion_effect_node = | 
| 1036           if (occlusion_surface->EffectTreeIndex() != | 1036               property_trees()->effect_tree.Node( | 
| 1037               EffectTree::kContentsRootNodeId) { | 1037                   occlusion_surface->EffectTreeIndex()); | 
| 1038             const EffectNode* occlusion_effect_node = | 1038           draw_property_utils::PostConcatSurfaceContentsScale( | 
| 1039                 property_trees()->effect_tree.Node( | 1039               occlusion_effect_node, &draw_transform); | 
| 1040                     occlusion_surface->EffectTreeIndex()); |  | 
| 1041             draw_property_utils::PostConcatSurfaceContentsScale( |  | 
| 1042                 occlusion_effect_node, &draw_transform); |  | 
| 1043           } |  | 
| 1044           const EffectNode* effect_node = property_trees()->effect_tree.Node( | 1040           const EffectNode* effect_node = property_trees()->effect_tree.Node( | 
| 1045               it->render_surface()->EffectTreeIndex()); | 1041               it->render_surface()->EffectTreeIndex()); | 
| 1046           draw_property_utils::ConcatInverseSurfaceContentsScale( | 1042           draw_property_utils::ConcatInverseSurfaceContentsScale( | 
| 1047               effect_node, &draw_transform); | 1043               effect_node, &draw_transform); | 
| 1048         } | 1044         } | 
| 1049 | 1045 | 
| 1050         Occlusion occlusion = | 1046         Occlusion occlusion = | 
| 1051             occlusion_tracker.GetCurrentOcclusionForContributingSurface( | 1047             occlusion_tracker.GetCurrentOcclusionForContributingSurface( | 
| 1052                 draw_transform); | 1048                 draw_transform); | 
| 1053         it->render_surface()->set_occlusion_in_content_space(occlusion); | 1049         it->render_surface()->set_occlusion_in_content_space(occlusion); | 
| (...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2073 | 2069 | 
| 2074 void LayerTreeImpl::ResetAllChangeTracking() { | 2070 void LayerTreeImpl::ResetAllChangeTracking() { | 
| 2075   layers_that_should_push_properties_.clear(); | 2071   layers_that_should_push_properties_.clear(); | 
| 2076   // Iterate over all layers, including masks. | 2072   // Iterate over all layers, including masks. | 
| 2077   for (auto& layer : *layers_) | 2073   for (auto& layer : *layers_) | 
| 2078     layer->ResetChangeTracking(); | 2074     layer->ResetChangeTracking(); | 
| 2079   property_trees_.ResetAllChangeTracking(); | 2075   property_trees_.ResetAllChangeTracking(); | 
| 2080 } | 2076 } | 
| 2081 | 2077 | 
| 2082 }  // namespace cc | 2078 }  // namespace cc | 
| OLD | NEW | 
|---|