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 "cc/layers/append_quads_data.h" | 7 #include "cc/layers/append_quads_data.h" |
8 #include "cc/quads/draw_quad.h" | 8 #include "cc/quads/draw_quad.h" |
9 #include "cc/resources/tile_priority.h" | 9 #include "cc/resources/tile_priority.h" |
10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 tree = host_impl_.pending_tree(); | 56 tree = host_impl_.pending_tree(); |
57 break; | 57 break; |
58 case NUM_TREES: | 58 case NUM_TREES: |
59 NOTREACHED(); | 59 NOTREACHED(); |
60 break; | 60 break; |
61 } | 61 } |
62 TestablePictureImageLayerImpl* layer = | 62 TestablePictureImageLayerImpl* layer = |
63 new TestablePictureImageLayerImpl(tree, id); | 63 new TestablePictureImageLayerImpl(tree, id); |
64 layer->SetBounds(gfx::Size(100, 200)); | 64 layer->SetBounds(gfx::Size(100, 200)); |
65 layer->SetContentBounds(gfx::Size(100, 200)); | 65 layer->SetContentBounds(gfx::Size(100, 200)); |
66 layer->tilings_.reset(new PictureLayerTilingSet(&tiling_client_, | 66 layer->tilings_.reset(new PictureLayerTilingSet(&tiling_client_)); |
67 layer->bounds())); | |
68 layer->pile_ = tiling_client_.GetPile(); | 67 layer->pile_ = tiling_client_.GetPile(); |
69 return make_scoped_ptr(layer); | 68 return make_scoped_ptr(layer); |
70 } | 69 } |
71 | 70 |
72 void SetupDrawPropertiesAndUpdateTiles(TestablePictureImageLayerImpl* layer, | 71 void SetupDrawPropertiesAndUpdateTiles(TestablePictureImageLayerImpl* layer, |
73 float ideal_contents_scale, | 72 float ideal_contents_scale, |
74 float device_scale_factor, | 73 float device_scale_factor, |
75 float page_scale_factor, | 74 float page_scale_factor, |
76 float maximum_animation_contents_scale, | 75 float maximum_animation_contents_scale, |
77 bool animating_transform_to_screen) { | 76 bool animating_transform_to_screen) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 active_layer->DidDraw(nullptr); | 152 active_layer->DidDraw(nullptr); |
154 | 153 |
155 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); | 154 EXPECT_EQ(DrawQuad::TILED_CONTENT, render_pass->quad_list.front()->material); |
156 | 155 |
157 // Tiles are ready at correct scale, so should not set had_incomplete_tile. | 156 // Tiles are ready at correct scale, so should not set had_incomplete_tile. |
158 EXPECT_EQ(0, data.num_incomplete_tiles); | 157 EXPECT_EQ(0, data.num_incomplete_tiles); |
159 } | 158 } |
160 | 159 |
161 } // namespace | 160 } // namespace |
162 } // namespace cc | 161 } // namespace cc |
OLD | NEW |