| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 float starting_animation_contents_scale, | 162 float starting_animation_contents_scale, |
| 163 bool animating_transform_to_screen) { | 163 bool animating_transform_to_screen) { |
| 164 layer->layer_tree_impl()->SetDeviceScaleFactor(device_scale_factor); | 164 layer->layer_tree_impl()->SetDeviceScaleFactor(device_scale_factor); |
| 165 host_impl()->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); | 165 host_impl()->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); |
| 166 | 166 |
| 167 gfx::Transform scale_transform; | 167 gfx::Transform scale_transform; |
| 168 scale_transform.Scale(ideal_contents_scale, ideal_contents_scale); | 168 scale_transform.Scale(ideal_contents_scale, ideal_contents_scale); |
| 169 layer->draw_properties().screen_space_transform = scale_transform; | 169 layer->draw_properties().screen_space_transform = scale_transform; |
| 170 layer->set_is_drawn_render_surface_layer_list_member(true); | 170 layer->set_is_drawn_render_surface_layer_list_member(true); |
| 171 DCHECK_EQ(layer->GetIdealContentsScale(), ideal_contents_scale); | 171 DCHECK_EQ(layer->GetIdealContentsScale(), ideal_contents_scale); |
| 172 layer->draw_properties().maximum_animation_contents_scale = | 172 layer->layer_tree_impl()->property_trees()->SetAnimationScalesForTesting( |
| 173 maximum_animation_contents_scale; | 173 layer->transform_tree_index(), maximum_animation_contents_scale, |
| 174 layer->draw_properties().starting_animation_contents_scale = | 174 starting_animation_contents_scale); |
| 175 starting_animation_contents_scale; | |
| 176 layer->draw_properties().screen_space_transform_is_animating = | 175 layer->draw_properties().screen_space_transform_is_animating = |
| 177 animating_transform_to_screen; | 176 animating_transform_to_screen; |
| 178 } | 177 } |
| 179 | 178 |
| 180 void SetupDrawPropertiesAndUpdateTiles( | 179 void SetupDrawPropertiesAndUpdateTiles( |
| 181 FakePictureLayerImpl* layer, | 180 FakePictureLayerImpl* layer, |
| 182 float ideal_contents_scale, | 181 float ideal_contents_scale, |
| 183 float device_scale_factor, | 182 float device_scale_factor, |
| 184 float page_scale_factor, | 183 float page_scale_factor, |
| 185 float maximum_animation_contents_scale, | 184 float maximum_animation_contents_scale, |
| (...skipping 4815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5001 EXPECT_FLOAT_EQ(expected_contents_scale, | 5000 EXPECT_FLOAT_EQ(expected_contents_scale, |
| 5002 pending_layer_ptr->picture_layer_tiling_set() | 5001 pending_layer_ptr->picture_layer_tiling_set() |
| 5003 ->FindTilingWithResolution(HIGH_RESOLUTION) | 5002 ->FindTilingWithResolution(HIGH_RESOLUTION) |
| 5004 ->contents_scale()) | 5003 ->contents_scale()) |
| 5005 << "ideal_contents_scale: " << ideal_contents_scale; | 5004 << "ideal_contents_scale: " << ideal_contents_scale; |
| 5006 } | 5005 } |
| 5007 } | 5006 } |
| 5008 | 5007 |
| 5009 } // namespace | 5008 } // namespace |
| 5010 } // namespace cc | 5009 } // namespace cc |
| OLD | NEW |