Index: cc/trees/draw_property_utils.cc |
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc |
index 694bf45f272a36c628b21b201db7edd86683b36d..253911692cd450a07c927cd46da11177b180dcfd 100644 |
--- a/cc/trees/draw_property_utils.cc |
+++ b/cc/trees/draw_property_utils.cc |
@@ -54,21 +54,6 @@ static void ValidateRenderSurfaceForLayer(LayerImpl* layer) { |
DCHECK(effect_node->background_filters.IsEmpty()); |
} |
-#endif |
- |
-static void ApplySublayerScale(const int effect_node_id, |
- const EffectTree& effect_tree, |
- gfx::Transform* transform) { |
- const EffectNode* effect_node = effect_tree.Node(effect_node_id); |
- const EffectNode* target_effect_node = |
- effect_node->has_render_surface |
- ? effect_node |
- : effect_tree.Node(effect_node->target_id); |
- transform->matrix().postScale(target_effect_node->sublayer_scale.x(), |
- target_effect_node->sublayer_scale.y(), 1.f); |
-} |
- |
-#if DCHECK_IS_ON() |
void VerifySublayerScalesMatch(const int effect_node_id, |
const int target_transform_id, |
const EffectTree& effect_tree, |
@@ -715,6 +700,28 @@ static void ResetIfHasNanCoordinate(gfx::RectF* rect) { |
*rect = gfx::RectF(); |
} |
+void ApplySublayerScale(const int effect_node_id, |
+ const EffectTree& effect_tree, |
+ gfx::Transform* transform) { |
+ const EffectNode* effect_node = effect_tree.Node(effect_node_id); |
+ const EffectNode* target_effect_node = |
+ effect_node->has_render_surface |
+ ? effect_node |
+ : effect_tree.Node(effect_node->target_id); |
+ transform->matrix().postScale(target_effect_node->sublayer_scale.x(), |
+ target_effect_node->sublayer_scale.y(), 1.f); |
+} |
+ |
+void RemoveSublayerScale(const int effect_node_id, |
+ const EffectTree& effect_tree, |
+ gfx::Transform* transform) { |
+ const EffectNode* effect_node = effect_tree.Node(effect_node_id); |
+ if (effect_node->sublayer_scale.x() != 0.0 && |
+ effect_node->sublayer_scale.y() != 0.0) |
+ transform->Scale(1.0 / effect_node->sublayer_scale.x(), |
+ 1.0 / effect_node->sublayer_scale.y()); |
+} |
+ |
void ComputeClips(ClipTree* clip_tree, |
const TransformTree& transform_tree, |
const EffectTree& effect_tree, |