Chromium Code Reviews| 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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1009 // TODO(sunxd): the draw transform of a mask layer misses the "scale to fit" | 1009 // TODO(sunxd): the draw transform of a mask layer misses the "scale to fit" |
| 1010 // factor from mask layer to its parent. So does the screen space transform. | 1010 // factor from mask layer to its parent. So does the screen space transform. |
| 1011 // It does not cause a problem because currently we only have 1:1 mask layer. | 1011 // It does not cause a problem because currently we only have 1:1 mask layer. |
| 1012 mask_layer->draw_properties().target_space_transform = DrawTransform( | 1012 mask_layer->draw_properties().target_space_transform = DrawTransform( |
| 1013 mask_layer, property_trees->transform_tree, property_trees->effect_tree); | 1013 mask_layer, property_trees->transform_tree, property_trees->effect_tree); |
| 1014 mask_layer->draw_properties().screen_space_transform = | 1014 mask_layer->draw_properties().screen_space_transform = |
| 1015 ScreenSpaceTransformInternal(mask_layer, | 1015 ScreenSpaceTransformInternal(mask_layer, |
| 1016 property_trees->transform_tree); | 1016 property_trees->transform_tree); |
| 1017 mask_layer->draw_properties().visible_layer_rect = | 1017 mask_layer->draw_properties().visible_layer_rect = |
| 1018 gfx::Rect(mask_layer->bounds()); | 1018 gfx::Rect(mask_layer->bounds()); |
| 1019 mask_layer->draw_properties().opacity = | |
|
enne (OOO)
2017/05/15 18:01:44
Sorry for my confusion, but I'm not sure why you n
| |
| 1020 LayerDrawOpacity(mask_layer, property_trees->effect_tree); | |
| 1019 } | 1021 } |
| 1020 | 1022 |
| 1021 void ComputeSurfaceDrawProperties(PropertyTrees* property_trees, | 1023 void ComputeSurfaceDrawProperties(PropertyTrees* property_trees, |
| 1022 RenderSurfaceImpl* render_surface) { | 1024 RenderSurfaceImpl* render_surface) { |
| 1023 SetSurfaceIsClipped(property_trees->clip_tree, render_surface); | 1025 SetSurfaceIsClipped(property_trees->clip_tree, render_surface); |
| 1024 SetSurfaceDrawOpacity(property_trees->effect_tree, render_surface); | 1026 SetSurfaceDrawOpacity(property_trees->effect_tree, render_surface); |
| 1025 SetSurfaceDrawTransform(property_trees, render_surface); | 1027 SetSurfaceDrawTransform(property_trees, render_surface); |
| 1026 render_surface->SetScreenSpaceTransform( | 1028 render_surface->SetScreenSpaceTransform( |
| 1027 property_trees->ToScreenSpaceTransformWithoutSurfaceContentsScale( | 1029 property_trees->ToScreenSpaceTransformWithoutSurfaceContentsScale( |
| 1028 render_surface->TransformTreeIndex(), | 1030 render_surface->TransformTreeIndex(), |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1063 void UpdateElasticOverscroll(PropertyTrees* property_trees, | 1065 void UpdateElasticOverscroll(PropertyTrees* property_trees, |
| 1064 const Layer* overscroll_elasticity_layer, | 1066 const Layer* overscroll_elasticity_layer, |
| 1065 const gfx::Vector2dF& elastic_overscroll) { | 1067 const gfx::Vector2dF& elastic_overscroll) { |
| 1066 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, | 1068 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, |
| 1067 elastic_overscroll); | 1069 elastic_overscroll); |
| 1068 } | 1070 } |
| 1069 | 1071 |
| 1070 } // namespace draw_property_utils | 1072 } // namespace draw_property_utils |
| 1071 | 1073 |
| 1072 } // namespace cc | 1074 } // namespace cc |
| OLD | NEW |