| 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 #ifndef CC_TEST_FAKE_PICTURE_PILE_H_ | 5 #ifndef CC_TEST_FAKE_PICTURE_PILE_H_ |
| 6 #define CC_TEST_FAKE_PICTURE_PILE_H_ | 6 #define CC_TEST_FAKE_PICTURE_PILE_H_ |
| 7 | 7 |
| 8 #include "cc/resources/picture_pile.h" | 8 #include "cc/resources/picture_pile.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 class WaitableEvent; | 11 class WaitableEvent; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 | 15 |
| 16 class FakePicturePile : public PicturePile { | 16 class FakePicturePile : public PicturePile { |
| 17 public: | 17 public: |
| 18 using PictureInfo = PicturePile::PictureInfo; | 18 using PictureInfo = PicturePile::PictureInfo; |
| 19 using PictureMapKey = PicturePile::PictureMapKey; | 19 using PictureMapKey = PicturePile::PictureMapKey; |
| 20 using PictureMap = PicturePile::PictureMap; | 20 using PictureMap = PicturePile::PictureMap; |
| 21 | 21 |
| 22 FakePicturePile() : playback_allowed_event_(nullptr) {} | 22 FakePicturePile(float min_contents_scale, const gfx::Size& tile_grid_size) |
| 23 : PicturePile(min_contents_scale, tile_grid_size), |
| 24 playback_allowed_event_(nullptr) {} |
| 23 ~FakePicturePile() override {} | 25 ~FakePicturePile() override {} |
| 24 | 26 |
| 25 // PicturePile overrides. | 27 // PicturePile overrides. |
| 26 scoped_refptr<RasterSource> CreateRasterSource() const override; | 28 scoped_refptr<RasterSource> CreateRasterSource() const override; |
| 27 | 29 |
| 28 using PicturePile::buffer_pixels; | 30 using PicturePile::buffer_pixels; |
| 29 using PicturePile::CanRasterSlowTileCheck; | 31 using PicturePile::CanRasterSlowTileCheck; |
| 30 using PicturePile::Clear; | 32 using PicturePile::Clear; |
| 31 using PicturePile::SetMinContentsScale; | 33 using PicturePile::SetMinContentsScale; |
| 32 using PicturePile::SetTileGridSize; | 34 using PicturePile::SetTileGridSize; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 62 | 64 |
| 63 void SetPixelRecordDistance(int d) { pixel_record_distance_ = d; } | 65 void SetPixelRecordDistance(int d) { pixel_record_distance_ = d; } |
| 64 | 66 |
| 65 private: | 67 private: |
| 66 base::WaitableEvent* playback_allowed_event_; | 68 base::WaitableEvent* playback_allowed_event_; |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 } // namespace cc | 71 } // namespace cc |
| 70 | 72 |
| 71 #endif // CC_TEST_FAKE_PICTURE_PILE_H_ | 73 #endif // CC_TEST_FAKE_PICTURE_PILE_H_ |
| OLD | NEW |