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_image_layer_impl.h" | 5 #include "cc/layers/picture_image_layer_impl.h" |
6 | 6 |
7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
8 #include "cc/layers/append_quads_data.h" | 8 #include "cc/layers/append_quads_data.h" |
9 #include "cc/quads/draw_quad.h" | 9 #include "cc/quads/draw_quad.h" |
10 #include "cc/test/fake_display_list_raster_source.h" | 10 #include "cc/test/fake_display_list_raster_source.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 SetupDrawPropertiesAndUpdateTiles(pending_layer.get(), | 126 SetupDrawPropertiesAndUpdateTiles(pending_layer.get(), |
127 suggested_ideal_contents_scale, | 127 suggested_ideal_contents_scale, |
128 device_scale_factor, | 128 device_scale_factor, |
129 page_scale_factor, | 129 page_scale_factor, |
130 maximum_animation_contents_scale, | 130 maximum_animation_contents_scale, |
131 animating_transform_to_screen, | 131 animating_transform_to_screen, |
132 viewport); | 132 viewport); |
133 EXPECT_EQ(1.f, pending_layer->tilings()->tiling_at(0)->contents_scale()); | 133 EXPECT_EQ(1.f, pending_layer->tilings()->tiling_at(0)->contents_scale()); |
134 | 134 |
135 // Push to active layer. | 135 // Push to active layer. |
136 host_impl_.pending_tree()->SetRootLayer(pending_layer.Pass()); | 136 host_impl_.pending_tree()->SetRootLayer(std::move(pending_layer)); |
137 host_impl_.ActivateSyncTree(); | 137 host_impl_.ActivateSyncTree(); |
138 | 138 |
139 TestablePictureImageLayerImpl* active_layer = | 139 TestablePictureImageLayerImpl* active_layer = |
140 static_cast<TestablePictureImageLayerImpl*>( | 140 static_cast<TestablePictureImageLayerImpl*>( |
141 host_impl_.active_tree()->root_layer()); | 141 host_impl_.active_tree()->root_layer()); |
142 SetupDrawPropertiesAndUpdateTiles(active_layer, | 142 SetupDrawPropertiesAndUpdateTiles(active_layer, |
143 suggested_ideal_contents_scale, | 143 suggested_ideal_contents_scale, |
144 device_scale_factor, | 144 device_scale_factor, |
145 page_scale_factor, | 145 page_scale_factor, |
146 maximum_animation_contents_scale, | 146 maximum_animation_contents_scale, |
(...skipping 13 matching lines...) Expand all Loading... |
160 active_layer->DidDraw(nullptr); | 160 active_layer->DidDraw(nullptr); |
161 | 161 |
162 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); | 162 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); |
163 | 163 |
164 // Tiles are ready at correct scale, so should not set had_incomplete_tile. | 164 // Tiles are ready at correct scale, so should not set had_incomplete_tile. |
165 EXPECT_EQ(0, data.num_incomplete_tiles); | 165 EXPECT_EQ(0, data.num_incomplete_tiles); |
166 } | 166 } |
167 | 167 |
168 } // namespace | 168 } // namespace |
169 } // namespace cc | 169 } // namespace cc |
OLD | NEW |