Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: cc/test/fake_engine_picture_cache.h

Issue 1982893002: [blimp] Add SkPicture caching support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge origin/master Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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/proto/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 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698