| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_ | |
| 6 #define CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "base/macros.h" | |
| 13 #include "cc/blimp/engine_picture_cache.h" | |
| 14 | |
| 15 class SkPicture; | |
| 16 | |
| 17 namespace cc { | |
| 18 class DisplayItemList; | |
| 19 class PictureCacheModel; | |
| 20 struct PictureData; | |
| 21 | |
| 22 class FakeEnginePictureCache : public EnginePictureCache { | |
| 23 public: | |
| 24 explicit FakeEnginePictureCache(PictureCacheModel* model); | |
| 25 ~FakeEnginePictureCache() override; | |
| 26 | |
| 27 void MarkAllSkPicturesAsUsed(const DisplayItemList* display_list); | |
| 28 const std::vector<uint32_t>& GetAllUsedPictureIds(); | |
| 29 | |
| 30 // EnginePictureCache implementation. | |
| 31 std::vector<PictureData> CalculateCacheUpdateAndFlush() override; | |
| 32 void MarkUsed(const SkPicture* picture) override; | |
| 33 | |
| 34 private: | |
| 35 PictureCacheModel* model_; | |
| 36 std::vector<uint32_t> used_picture_ids_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(FakeEnginePictureCache); | |
| 39 }; | |
| 40 | |
| 41 } // namespace cc | |
| 42 | |
| 43 #endif // CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_ | |
| OLD | NEW |