OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test/fake_picture_pile.h" | 5 #include "cc/test/fake_picture_pile.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "cc/test/fake_picture_pile_impl.h" | 9 #include "cc/test/fake_picture_pile_impl.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 return CreatePile(tile_size, layer_bounds, is_filled); | 42 return CreatePile(tile_size, layer_bounds, is_filled); |
43 } | 43 } |
44 | 44 |
45 scoped_ptr<FakePicturePile> FakePicturePile::CreateEmptyPile( | 45 scoped_ptr<FakePicturePile> FakePicturePile::CreateEmptyPile( |
46 const gfx::Size& tile_size, | 46 const gfx::Size& tile_size, |
47 const gfx::Size& layer_bounds) { | 47 const gfx::Size& layer_bounds) { |
48 bool is_filled = false; | 48 bool is_filled = false; |
49 return CreatePile(tile_size, layer_bounds, is_filled); | 49 return CreatePile(tile_size, layer_bounds, is_filled); |
50 } | 50 } |
51 | 51 |
52 scoped_refptr<RasterSource> FakePicturePile::CreateRasterSource( | 52 scoped_refptr<RasterSource> FakePicturePile::CreateRasterSource() const { |
53 bool can_use_lcd_text) const { | |
54 return FakePicturePileImpl::CreateFromPile(this, playback_allowed_event_); | 53 return FakePicturePileImpl::CreateFromPile(this, playback_allowed_event_); |
55 } | 54 } |
56 | 55 |
57 void FakePicturePile::AddRecordingAt(int x, int y) { | 56 void FakePicturePile::AddRecordingAt(int x, int y) { |
58 EXPECT_GE(x, 0); | 57 EXPECT_GE(x, 0); |
59 EXPECT_GE(y, 0); | 58 EXPECT_GE(y, 0); |
60 EXPECT_LT(x, tiling_.num_tiles_x()); | 59 EXPECT_LT(x, tiling_.num_tiles_x()); |
61 EXPECT_LT(y, tiling_.num_tiles_y()); | 60 EXPECT_LT(y, tiling_.num_tiles_y()); |
62 | 61 |
63 if (HasRecordingAt(x, y)) | 62 if (HasRecordingAt(x, y)) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 void FakePicturePile::RerecordPile() { | 95 void FakePicturePile::RerecordPile() { |
97 for (int y = 0; y < num_tiles_y(); ++y) { | 96 for (int y = 0; y < num_tiles_y(); ++y) { |
98 for (int x = 0; x < num_tiles_x(); ++x) { | 97 for (int x = 0; x < num_tiles_x(); ++x) { |
99 RemoveRecordingAt(x, y); | 98 RemoveRecordingAt(x, y); |
100 AddRecordingAt(x, y); | 99 AddRecordingAt(x, y); |
101 } | 100 } |
102 } | 101 } |
103 } | 102 } |
104 | 103 |
105 } // namespace cc | 104 } // namespace cc |
OLD | NEW |