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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "cc/layers/append_quads_data.h" | 9 #include "cc/layers/append_quads_data.h" |
10 #include "cc/layers/picture_layer.h" | 10 #include "cc/layers/picture_layer.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 MockCanvas mock_canvas(&device); | 217 MockCanvas mock_canvas(&device); |
218 active_pile->Raster(&mock_canvas, | 218 active_pile->Raster(&mock_canvas, |
219 (*tile_iter)->content_rect(), | 219 (*tile_iter)->content_rect(), |
220 1.0f, | 220 1.0f, |
221 NULL); | 221 NULL); |
222 | 222 |
223 // This test verifies that when drawing the contents of a specific tile | 223 // This test verifies that when drawing the contents of a specific tile |
224 // at content scale 1.0, the playback canvas never receives content from | 224 // at content scale 1.0, the playback canvas never receives content from |
225 // neighboring tiles which indicates that the tile grid embedded in | 225 // neighboring tiles which indicates that the tile grid embedded in |
226 // SkPicture is perfectly aligned with the compositor's tiles. | 226 // SkPicture is perfectly aligned with the compositor's tiles. |
227 // Note: There are two rects: the initial clear and the explicitly | 227 EXPECT_EQ(1u, mock_canvas.rects_.size()); |
enne (OOO)
2013/05/13 19:33:10
This change is because the clear moved to RasterTo
| |
228 // recorded rect. We only care about the second one. | 228 EXPECT_RECT_EQ(*rect_iter, mock_canvas.rects_[0]); |
229 EXPECT_EQ(2u, mock_canvas.rects_.size()); | |
230 EXPECT_RECT_EQ(*rect_iter, mock_canvas.rects_[1]); | |
231 rect_iter++; | 229 rect_iter++; |
232 } | 230 } |
233 } | 231 } |
234 | 232 |
235 FakeImplProxy proxy_; | 233 FakeImplProxy proxy_; |
236 FakeLayerTreeHostImpl host_impl_; | 234 FakeLayerTreeHostImpl host_impl_; |
237 int id_; | 235 int id_; |
238 TestablePictureLayerImpl* pending_layer_; | 236 TestablePictureLayerImpl* pending_layer_; |
239 TestablePictureLayerImpl* active_layer_; | 237 TestablePictureLayerImpl* active_layer_; |
240 | 238 |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
852 AppendQuadsData data; | 850 AppendQuadsData data; |
853 data.allow_tile_draw_quads = false; | 851 data.allow_tile_draw_quads = false; |
854 active_layer_->AppendQuads(&quad_culler, &data); | 852 active_layer_->AppendQuads(&quad_culler, &data); |
855 | 853 |
856 ASSERT_EQ(1U, quad_culler.quad_list().size()); | 854 ASSERT_EQ(1U, quad_culler.quad_list().size()); |
857 EXPECT_EQ(DrawQuad::PICTURE_CONTENT, quad_culler.quad_list()[0]->material); | 855 EXPECT_EQ(DrawQuad::PICTURE_CONTENT, quad_culler.quad_list()[0]->material); |
858 } | 856 } |
859 | 857 |
860 } // namespace | 858 } // namespace |
861 } // namespace cc | 859 } // namespace cc |
OLD | NEW |