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_CLIENT_PICTURE_CACHE_H_ | |
6 #define CC_TEST_FAKE_CLIENT_PICTURE_CACHE_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include <map> | |
11 #include <memory> | |
12 | |
13 #include "base/macros.h" | |
14 #include "cc/proto/client_picture_cache.h" | |
15 | |
16 namespace cc { | |
17 class PictureCacheModel; | |
18 | |
19 class FakeClientPictureCache : public ClientPictureCache { | |
20 public: | |
21 explicit FakeClientPictureCache(PictureCacheModel* model); | |
22 ~FakeClientPictureCache() override; | |
23 | |
24 std::vector<uint32_t> GetAllUsedPictureIds(); | |
vmpstr
2016/06/24 18:58:32
return const& here.
nyquist
2016/06/24 20:31:23
Done.
| |
25 | |
26 // ClientPictureCache implementation. | |
27 void MarkUsed(uint32_t engine_picture_id) override; | |
28 sk_sp<const SkPicture> GetPicture(uint32_t unique_id) override; | |
29 void ApplyCacheUpdate(const std::vector<PictureData>& cache_update) override; | |
30 void Flush() override; | |
31 | |
32 private: | |
33 PictureCacheModel* model_; | |
34 std::vector<uint32_t> used_picture_ids_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(FakeClientPictureCache); | |
37 }; | |
38 | |
39 } // namespace cc | |
40 | |
41 #endif // CC_TEST_FAKE_CLIENT_PICTURE_CACHE_H_ | |
OLD | NEW |