| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_ENGINE_PICTURE_CACHE_H_ | 5 #ifndef CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_ |
| 6 #define CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_ | 6 #define CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "cc/blimp/engine_picture_cache.h" | 13 #include "cc/blimp/engine_picture_cache.h" |
| 14 | 14 #include "skia/ext/cdl_common.h" |
| 15 class SkPicture; | |
| 16 | 15 |
| 17 namespace cc { | 16 namespace cc { |
| 18 class DisplayItemList; | 17 class DisplayItemList; |
| 19 class PictureCacheModel; | 18 class PictureCacheModel; |
| 20 struct PictureData; | 19 struct PictureData; |
| 21 | 20 |
| 22 class FakeEnginePictureCache : public EnginePictureCache { | 21 class FakeEnginePictureCache : public EnginePictureCache { |
| 23 public: | 22 public: |
| 24 explicit FakeEnginePictureCache(PictureCacheModel* model); | 23 explicit FakeEnginePictureCache(PictureCacheModel* model); |
| 25 ~FakeEnginePictureCache() override; | 24 ~FakeEnginePictureCache() override; |
| 26 | 25 |
| 27 void MarkAllSkPicturesAsUsed(const DisplayItemList* display_list); | 26 void MarkAllSkPicturesAsUsed(const DisplayItemList* display_list); |
| 28 const std::vector<uint32_t>& GetAllUsedPictureIds(); | 27 const std::vector<uint32_t>& GetAllUsedPictureIds(); |
| 29 | 28 |
| 30 // EnginePictureCache implementation. | 29 // EnginePictureCache implementation. |
| 31 std::vector<PictureData> CalculateCacheUpdateAndFlush() override; | 30 std::vector<PictureData> CalculateCacheUpdateAndFlush() override; |
| 32 void MarkUsed(const SkPicture* picture) override; | 31 void MarkUsed(const CdlPicture* picture) override; |
| 33 | 32 |
| 34 private: | 33 private: |
| 35 PictureCacheModel* model_; | 34 PictureCacheModel* model_; |
| 36 std::vector<uint32_t> used_picture_ids_; | 35 std::vector<uint32_t> used_picture_ids_; |
| 37 | 36 |
| 38 DISALLOW_COPY_AND_ASSIGN(FakeEnginePictureCache); | 37 DISALLOW_COPY_AND_ASSIGN(FakeEnginePictureCache); |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 } // namespace cc | 40 } // namespace cc |
| 42 | 41 |
| 43 #endif // CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_ | 42 #endif // CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_ |
| OLD | NEW |