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 #ifndef CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ | 5 #ifndef CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ |
6 #define CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ | 6 #define CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "cc/resources/picture_pile_impl.h" | 9 #include "cc/resources/picture_pile_impl.h" |
10 #include "cc/test/fake_content_layer_client.h" | 10 #include "cc/test/fake_content_layer_client.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class WaitableEvent; | 13 class WaitableEvent; |
14 } | 14 } |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 | 17 |
18 class FakePicturePileImpl : public PicturePileImpl { | 18 class FakePicturePileImpl : public PicturePileImpl { |
19 public: | 19 public: |
| 20 static scoped_refptr<FakePicturePileImpl> CreateFilledPileWithDefaultTileSize( |
| 21 const gfx::Size& layer_bounds) { |
| 22 return CreateFilledPile(gfx::Size(512, 512), layer_bounds); |
| 23 } |
| 24 static scoped_refptr<FakePicturePileImpl> CreateEmptyPileWithDefaultTileSize( |
| 25 const gfx::Size& layer_bounds) { |
| 26 return CreateEmptyPile(gfx::Size(512, 512), layer_bounds); |
| 27 } |
20 static scoped_refptr<FakePicturePileImpl> CreateFilledPile( | 28 static scoped_refptr<FakePicturePileImpl> CreateFilledPile( |
21 const gfx::Size& tile_size, | 29 const gfx::Size& tile_size, |
22 const gfx::Size& layer_bounds); | 30 const gfx::Size& layer_bounds); |
23 static scoped_refptr<FakePicturePileImpl> CreateEmptyPile( | 31 static scoped_refptr<FakePicturePileImpl> CreateEmptyPile( |
24 const gfx::Size& tile_size, | 32 const gfx::Size& tile_size, |
25 const gfx::Size& layer_bounds); | 33 const gfx::Size& layer_bounds); |
26 static scoped_refptr<FakePicturePileImpl> | 34 static scoped_refptr<FakePicturePileImpl> |
27 CreateEmptyPileThatThinksItHasRecordings(const gfx::Size& tile_size, | 35 CreateEmptyPileThatThinksItHasRecordings(const gfx::Size& tile_size, |
28 const gfx::Size& layer_bounds); | 36 const gfx::Size& layer_bounds); |
29 static scoped_refptr<FakePicturePileImpl> CreateInfiniteFilledPile(); | 37 static scoped_refptr<FakePicturePileImpl> CreateInfiniteFilledPile(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 101 |
94 FakeContentLayerClient client_; | 102 FakeContentLayerClient client_; |
95 SkPaint default_paint_; | 103 SkPaint default_paint_; |
96 base::WaitableEvent* playback_allowed_event_; | 104 base::WaitableEvent* playback_allowed_event_; |
97 SkTileGridFactory::TileGridInfo tile_grid_info_; | 105 SkTileGridFactory::TileGridInfo tile_grid_info_; |
98 }; | 106 }; |
99 | 107 |
100 } // namespace cc | 108 } // namespace cc |
101 | 109 |
102 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ | 110 #endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ |
OLD | NEW |