| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 float device_scale_factor, | 159 float device_scale_factor, |
| 160 float page_scale_factor, | 160 float page_scale_factor, |
| 161 float maximum_animation_contents_scale, | 161 float maximum_animation_contents_scale, |
| 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().target_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->draw_properties().maximum_animation_contents_scale = |
| 173 maximum_animation_contents_scale; | 173 maximum_animation_contents_scale; |
| 174 layer->draw_properties().starting_animation_contents_scale = | 174 layer->draw_properties().starting_animation_contents_scale = |
| 175 starting_animation_contents_scale; | 175 starting_animation_contents_scale; |
| 176 layer->draw_properties().screen_space_transform_is_animating = | 176 layer->draw_properties().screen_space_transform_is_animating = |
| 177 animating_transform_to_screen; | 177 animating_transform_to_screen; |
| 178 } | 178 } |
| 179 | 179 |
| (...skipping 4582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4762 // New low res tiling. | 4762 // New low res tiling. |
| 4763 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); | 4763 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); |
| 4764 | 4764 |
| 4765 // This tiling will be high res now, it won't contain low res content since it | 4765 // This tiling will be high res now, it won't contain low res content since it |
| 4766 // was all destroyed. | 4766 // was all destroyed. |
| 4767 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); | 4767 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); |
| 4768 } | 4768 } |
| 4769 | 4769 |
| 4770 } // namespace | 4770 } // namespace |
| 4771 } // namespace cc | 4771 } // namespace cc |
| OLD | NEW |