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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 if (it.represents_contributing_render_surface()) { | 994 if (it.represents_contributing_render_surface()) { |
995 // Surfaces aren't used by the tile raster code, so they can have | 995 // Surfaces aren't used by the tile raster code, so they can have |
996 // occlusion regardless of replicas. | 996 // occlusion regardless of replicas. |
997 const RenderSurfaceImpl* occlusion_surface = | 997 const RenderSurfaceImpl* occlusion_surface = |
998 occlusion_tracker.OcclusionSurfaceForContributingSurface(); | 998 occlusion_tracker.OcclusionSurfaceForContributingSurface(); |
999 gfx::Transform draw_transform; | 999 gfx::Transform draw_transform; |
1000 if (occlusion_surface) { | 1000 if (occlusion_surface) { |
1001 // We are calculating transform between two render surfaces. So, we | 1001 // We are calculating transform between two render surfaces. So, we |
1002 // need to apply the surface contents scale at target and remove the | 1002 // need to apply the surface contents scale at target and remove the |
1003 // surface contents scale at source. | 1003 // surface contents scale at source. |
1004 property_trees()->transform_tree.ComputeTransform( | 1004 property_trees()->ComputeTransformToTarget( |
1005 it->render_surface()->TransformTreeIndex(), | 1005 it->render_surface()->TransformTreeIndex(), |
1006 occlusion_surface->TransformTreeIndex(), &draw_transform); | 1006 occlusion_surface->EffectTreeIndex(), &draw_transform); |
1007 // We don't have to apply surface contents scale when target is root. | 1007 // We don't have to apply surface contents scale when target is root. |
1008 if (occlusion_surface->TransformTreeIndex() != 0) { | 1008 if (occlusion_surface->TransformTreeIndex() != 0) { |
1009 const EffectNode* occlusion_effect_node = | 1009 const EffectNode* occlusion_effect_node = |
1010 property_trees()->effect_tree.Node( | 1010 property_trees()->effect_tree.Node( |
1011 occlusion_surface->EffectTreeIndex()); | 1011 occlusion_surface->EffectTreeIndex()); |
1012 draw_property_utils::PostConcatSurfaceContentsScale( | 1012 draw_property_utils::PostConcatSurfaceContentsScale( |
1013 occlusion_effect_node, &draw_transform); | 1013 occlusion_effect_node, &draw_transform); |
1014 } | 1014 } |
1015 const EffectNode* effect_node = property_trees()->effect_tree.Node( | 1015 const EffectNode* effect_node = property_trees()->effect_tree.Node( |
1016 it->render_surface()->EffectTreeIndex()); | 1016 it->render_surface()->EffectTreeIndex()); |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 | 2032 |
2033 void LayerTreeImpl::ResetAllChangeTracking() { | 2033 void LayerTreeImpl::ResetAllChangeTracking() { |
2034 layers_that_should_push_properties_.clear(); | 2034 layers_that_should_push_properties_.clear(); |
2035 // Iterate over all layers, including masks and replicas. | 2035 // Iterate over all layers, including masks and replicas. |
2036 for (auto& layer : *layers_) | 2036 for (auto& layer : *layers_) |
2037 layer->ResetChangeTracking(); | 2037 layer->ResetChangeTracking(); |
2038 property_trees_.ResetAllChangeTracking(); | 2038 property_trees_.ResetAllChangeTracking(); |
2039 } | 2039 } |
2040 | 2040 |
2041 } // namespace cc | 2041 } // namespace cc |
OLD | NEW |