| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/draw_property_utils.h" | 5 #include "cc/trees/draw_property_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 // TODO(sunxd): the draw transform of a mask layer misses the "scale to fit" | 1016 // TODO(sunxd): the draw transform of a mask layer misses the "scale to fit" |
| 1017 // factor from mask layer to its parent. So does the screen space transform. | 1017 // factor from mask layer to its parent. So does the screen space transform. |
| 1018 // It does not cause a problem because currently we only have 1:1 mask layer. | 1018 // It does not cause a problem because currently we only have 1:1 mask layer. |
| 1019 mask_layer->draw_properties().target_space_transform = DrawTransform( | 1019 mask_layer->draw_properties().target_space_transform = DrawTransform( |
| 1020 mask_layer, property_trees->transform_tree, property_trees->effect_tree); | 1020 mask_layer, property_trees->transform_tree, property_trees->effect_tree); |
| 1021 mask_layer->draw_properties().screen_space_transform = | 1021 mask_layer->draw_properties().screen_space_transform = |
| 1022 ScreenSpaceTransformInternal(mask_layer, | 1022 ScreenSpaceTransformInternal(mask_layer, |
| 1023 property_trees->transform_tree); | 1023 property_trees->transform_tree); |
| 1024 mask_layer->draw_properties().visible_layer_rect = | 1024 mask_layer->draw_properties().visible_layer_rect = |
| 1025 gfx::Rect(mask_layer->bounds()); | 1025 gfx::Rect(mask_layer->bounds()); |
| 1026 mask_layer->draw_properties().opacity = 1; |
| 1026 } | 1027 } |
| 1027 | 1028 |
| 1028 void ComputeSurfaceDrawProperties(PropertyTrees* property_trees, | 1029 void ComputeSurfaceDrawProperties(PropertyTrees* property_trees, |
| 1029 RenderSurfaceImpl* render_surface) { | 1030 RenderSurfaceImpl* render_surface) { |
| 1030 SetSurfaceIsClipped(property_trees->clip_tree, render_surface); | 1031 SetSurfaceIsClipped(property_trees->clip_tree, render_surface); |
| 1031 SetSurfaceDrawOpacity(property_trees->effect_tree, render_surface); | 1032 SetSurfaceDrawOpacity(property_trees->effect_tree, render_surface); |
| 1032 SetSurfaceDrawTransform(property_trees, render_surface); | 1033 SetSurfaceDrawTransform(property_trees, render_surface); |
| 1033 render_surface->SetScreenSpaceTransform( | 1034 render_surface->SetScreenSpaceTransform( |
| 1034 property_trees->ToScreenSpaceTransformWithoutSurfaceContentsScale( | 1035 property_trees->ToScreenSpaceTransformWithoutSurfaceContentsScale( |
| 1035 render_surface->TransformTreeIndex(), | 1036 render_surface->TransformTreeIndex(), |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 void UpdateElasticOverscroll(PropertyTrees* property_trees, | 1071 void UpdateElasticOverscroll(PropertyTrees* property_trees, |
| 1071 const Layer* overscroll_elasticity_layer, | 1072 const Layer* overscroll_elasticity_layer, |
| 1072 const gfx::Vector2dF& elastic_overscroll) { | 1073 const gfx::Vector2dF& elastic_overscroll) { |
| 1073 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, | 1074 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, |
| 1074 elastic_overscroll); | 1075 elastic_overscroll); |
| 1075 } | 1076 } |
| 1076 | 1077 |
| 1077 } // namespace draw_property_utils | 1078 } // namespace draw_property_utils |
| 1078 | 1079 |
| 1079 } // namespace cc | 1080 } // namespace cc |
| OLD | NEW |