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

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

Issue 2717533005: cc: RenderSurfaceImpl tile mask layer. (Closed)
Patch Set: Fix init problems on mac. 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
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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 gfx::Rect(layer->bounds())); 950 gfx::Rect(layer->bounds()));
951 layer->draw_properties().drawable_content_rect = LayerDrawableContentRect( 951 layer->draw_properties().drawable_content_rect = LayerDrawableContentRect(
952 layer, bounds_in_target_space, layer->draw_properties().clip_rect); 952 layer, bounds_in_target_space, layer->draw_properties().clip_rect);
953 } 953 }
954 } 954 }
955 955
956 void ComputeMaskDrawProperties(LayerImpl* mask_layer, 956 void ComputeMaskDrawProperties(LayerImpl* mask_layer,
957 const PropertyTrees* property_trees) { 957 const PropertyTrees* property_trees) {
958 // Mask draw properties are used only for rastering, so most of the draw 958 // Mask draw properties are used only for rastering, so most of the draw
959 // properties computed for other layers are not needed. 959 // properties computed for other layers are not needed.
960 // Draw transform of a mask layer has to be a 2d scale.
961 // TODO(sunxd): the draw transform of a mask layer misses the "scale to fit"
962 // factor from mask layer to its parent. So does the screen space transform.
963 // It does not cause a problem because currently we only have 1:1 mask layer.
964 mask_layer->draw_properties().target_space_transform = DrawTransform(
965 mask_layer, property_trees->transform_tree, property_trees->effect_tree);
960 mask_layer->draw_properties().screen_space_transform = 966 mask_layer->draw_properties().screen_space_transform =
961 ScreenSpaceTransformInternal(mask_layer, 967 ScreenSpaceTransformInternal(mask_layer,
962 property_trees->transform_tree); 968 property_trees->transform_tree);
963 mask_layer->draw_properties().visible_layer_rect = 969 mask_layer->draw_properties().visible_layer_rect =
964 gfx::Rect(mask_layer->bounds()); 970 gfx::Rect(mask_layer->bounds());
965 } 971 }
966 972
967 void ComputeSurfaceDrawProperties(PropertyTrees* property_trees, 973 void ComputeSurfaceDrawProperties(PropertyTrees* property_trees,
968 RenderSurfaceImpl* render_surface, 974 RenderSurfaceImpl* render_surface,
969 const bool use_layer_lists) { 975 const bool use_layer_lists) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 void UpdateElasticOverscroll(PropertyTrees* property_trees, 1028 void UpdateElasticOverscroll(PropertyTrees* property_trees,
1023 const Layer* overscroll_elasticity_layer, 1029 const Layer* overscroll_elasticity_layer,
1024 const gfx::Vector2dF& elastic_overscroll) { 1030 const gfx::Vector2dF& elastic_overscroll) {
1025 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, 1031 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer,
1026 elastic_overscroll); 1032 elastic_overscroll);
1027 } 1033 }
1028 1034
1029 } // namespace draw_property_utils 1035 } // namespace draw_property_utils
1030 1036
1031 } // namespace cc 1037 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698