| 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/picture_layer_impl.h" | 5 #include "cc/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include "cc/layer_tree_impl.h" | 7 #include "cc/layer_tree_impl.h" |
| 8 #include "cc/test/fake_content_layer_client.h" | 8 #include "cc/test/fake_content_layer_client.h" |
| 9 #include "cc/test/fake_impl_proxy.h" | 9 #include "cc/test/fake_impl_proxy.h" |
| 10 #include "cc/test/fake_layer_tree_host_impl.h" | 10 #include "cc/test/fake_layer_tree_host_impl.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 EXPECT_GE(x, 0); | 74 EXPECT_GE(x, 0); |
| 75 EXPECT_GE(y, 0); | 75 EXPECT_GE(y, 0); |
| 76 EXPECT_LT(x, tiling_.num_tiles_x()); | 76 EXPECT_LT(x, tiling_.num_tiles_x()); |
| 77 EXPECT_LT(y, tiling_.num_tiles_y()); | 77 EXPECT_LT(y, tiling_.num_tiles_y()); |
| 78 | 78 |
| 79 if (HasRecordingAt(x, y)) | 79 if (HasRecordingAt(x, y)) |
| 80 return; | 80 return; |
| 81 gfx::Rect bounds(tiling().TileBounds(x, y)); | 81 gfx::Rect bounds(tiling().TileBounds(x, y)); |
| 82 scoped_refptr<Picture> picture(Picture::Create(bounds)); | 82 scoped_refptr<Picture> picture(Picture::Create(bounds)); |
| 83 FakeContentLayerClient client; | 83 FakeContentLayerClient client; |
| 84 RenderingStats stats; | 84 picture->Record(&client, NULL); |
| 85 picture->Record(&client, stats); | |
| 86 picture_list_map_[std::pair<int, int>(x, y)].push_back(picture); | 85 picture_list_map_[std::pair<int, int>(x, y)].push_back(picture); |
| 87 EXPECT_TRUE(HasRecordingAt(x, y)); | 86 EXPECT_TRUE(HasRecordingAt(x, y)); |
| 88 } | 87 } |
| 89 | 88 |
| 90 void RemoveRecordingAt(int x, int y) { | 89 void RemoveRecordingAt(int x, int y) { |
| 91 EXPECT_GE(x, 0); | 90 EXPECT_GE(x, 0); |
| 92 EXPECT_GE(y, 0); | 91 EXPECT_GE(y, 0); |
| 93 EXPECT_LT(x, tiling_.num_tiles_x()); | 92 EXPECT_LT(x, tiling_.num_tiles_x()); |
| 94 EXPECT_LT(y, tiling_.num_tiles_y()); | 93 EXPECT_LT(y, tiling_.num_tiles_y()); |
| 95 | 94 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 else if (in_active) | 335 else if (in_active) |
| 337 EXPECT_EQ(active_pile, iter->picture_pile()); | 336 EXPECT_EQ(active_pile, iter->picture_pile()); |
| 338 else | 337 else |
| 339 EXPECT_FALSE(*iter); | 338 EXPECT_FALSE(*iter); |
| 340 } | 339 } |
| 341 } | 340 } |
| 342 } | 341 } |
| 343 | 342 |
| 344 } // namespace | 343 } // namespace |
| 345 } // namespace cc | 344 } // namespace cc |
| OLD | NEW |