Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: cc/trees/draw_property_utils.cc

Issue 2811013002: Revert: cc: RenderSurfaceImpl tile mask layer. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/fake_mask_layer_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 gfx::Rect(layer->bounds())); 1023 gfx::Rect(layer->bounds()));
1024 layer->draw_properties().drawable_content_rect = LayerDrawableContentRect( 1024 layer->draw_properties().drawable_content_rect = LayerDrawableContentRect(
1025 layer, bounds_in_target_space, layer->draw_properties().clip_rect); 1025 layer, bounds_in_target_space, layer->draw_properties().clip_rect);
1026 } 1026 }
1027 } 1027 }
1028 1028
1029 void ComputeMaskDrawProperties(LayerImpl* mask_layer, 1029 void ComputeMaskDrawProperties(LayerImpl* mask_layer,
1030 const PropertyTrees* property_trees) { 1030 const PropertyTrees* property_trees) {
1031 // Mask draw properties are used only for rastering, so most of the draw 1031 // Mask draw properties are used only for rastering, so most of the draw
1032 // properties computed for other layers are not needed. 1032 // properties computed for other layers are not needed.
1033 // Draw transform of a mask layer has to be a 2d scale.
1034 // TODO(sunxd): the draw transform of a mask layer misses the "scale to fit"
1035 // factor from mask layer to its parent. So does the screen space transform.
1036 // It does not cause a problem because currently we only have 1:1 mask layer.
1037 mask_layer->draw_properties().target_space_transform = DrawTransform(
1038 mask_layer, property_trees->transform_tree, property_trees->effect_tree);
1039 mask_layer->draw_properties().screen_space_transform = 1033 mask_layer->draw_properties().screen_space_transform =
1040 ScreenSpaceTransformInternal(mask_layer, 1034 ScreenSpaceTransformInternal(mask_layer,
1041 property_trees->transform_tree); 1035 property_trees->transform_tree);
1042 mask_layer->draw_properties().visible_layer_rect = 1036 mask_layer->draw_properties().visible_layer_rect =
1043 gfx::Rect(mask_layer->bounds()); 1037 gfx::Rect(mask_layer->bounds());
1044 } 1038 }
1045 1039
1046 void ComputeSurfaceDrawProperties(PropertyTrees* property_trees, 1040 void ComputeSurfaceDrawProperties(PropertyTrees* property_trees,
1047 RenderSurfaceImpl* render_surface, 1041 RenderSurfaceImpl* render_surface,
1048 const bool use_layer_lists) { 1042 const bool use_layer_lists) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1083 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1090 const Layer* overscroll_elasticity_layer, 1084 const Layer* overscroll_elasticity_layer,
1091 const gfx::Vector2dF& elastic_overscroll) { 1085 const gfx::Vector2dF& elastic_overscroll) {
1092 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1086 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1093 elastic_overscroll); 1087 elastic_overscroll);
1094 } 1088 }
1095 1089
1096 } // namespace draw_property_utils 1090 } // namespace draw_property_utils
1097 1091
1098 } // namespace cc 1092 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_mask_layer_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698