| Index: cc/test/fake_engine_picture_cache.h
|
| diff --git a/cc/test/fake_engine_picture_cache.h b/cc/test/fake_engine_picture_cache.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d37dde0ab2a2d0a1f1099eec5af691be8f2133c5
|
| --- /dev/null
|
| +++ b/cc/test/fake_engine_picture_cache.h
|
| @@ -0,0 +1,43 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_
|
| +#define CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_
|
| +
|
| +#include <stdint.h>
|
| +
|
| +#include <vector>
|
| +
|
| +#include "base/macros.h"
|
| +#include "cc/proto/engine_picture_cache.h"
|
| +
|
| +class SkPicture;
|
| +
|
| +namespace cc {
|
| +class DisplayItemList;
|
| +class PictureCacheModel;
|
| +struct PictureData;
|
| +
|
| +class FakeEnginePictureCache : public EnginePictureCache {
|
| + public:
|
| + explicit FakeEnginePictureCache(PictureCacheModel* model);
|
| + ~FakeEnginePictureCache() override;
|
| +
|
| + void MarkAllSkPicturesAsUsed(const DisplayItemList* display_list);
|
| + std::vector<uint32_t> GetAllUsedPictureIds();
|
| +
|
| + // EnginePictureCache implementation.
|
| + std::vector<PictureData> CalculateCacheUpdateAndFlush() override;
|
| + void MarkUsed(const SkPicture* picture) override;
|
| +
|
| + private:
|
| + PictureCacheModel* model_;
|
| + std::vector<uint32_t> used_picture_ids_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(FakeEnginePictureCache);
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // CC_TEST_FAKE_ENGINE_PICTURE_CACHE_H_
|
|
|