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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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
« no previous file with comments | « cc/test/fake_scrollbar.cc ('k') | cc/test/picture_cache_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PICTURE_CACHE_MODEL_H_ 5 #ifndef CC_TEST_PICTURE_CACHE_MODEL_H_
6 #define CC_TEST_PICTURE_CACHE_MODEL_H_ 6 #define CC_TEST_PICTURE_CACHE_MODEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <unordered_map> 10 #include <unordered_map>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "skia/ext/cdl_common.h"
13 #include "third_party/skia/include/core/SkRefCnt.h" 14 #include "third_party/skia/include/core/SkRefCnt.h"
14 15
15 class SkPicture;
16
17 namespace cc { 16 namespace cc {
18 17
19 // PictureCacheModel provides a way for sharing a cache between an engine 18 // PictureCacheModel provides a way for sharing a cache between an engine
20 // and the client. When the FakeEnginePictureCache and the ClientPictureCache 19 // and the client. When the FakeEnginePictureCache and the ClientPictureCache
21 // point to the same PictureCacheModel, the calls to AddPicture on the 20 // point to the same PictureCacheModel, the calls to AddPicture on the
22 // engine make an SkPicture available through GetPicture on the client. 21 // engine make an SkPicture available through GetPicture on the client.
23 class PictureCacheModel { 22 class PictureCacheModel {
24 public: 23 public:
25 PictureCacheModel(); 24 PictureCacheModel();
26 ~PictureCacheModel(); 25 ~PictureCacheModel();
27 26
28 void AddPicture(const SkPicture* picture); 27 void AddPicture(const CdlPicture* picture);
29 28
30 sk_sp<const SkPicture> GetPicture(uint32_t unique_id); 29 sk_sp<const CdlPicture> GetPicture(uint32_t unique_id);
31 30
32 private: 31 private:
33 std::unordered_map<uint32_t, sk_sp<const SkPicture>> pictures_; 32 std::unordered_map<uint32_t, sk_sp<const CdlPicture>> pictures_;
34 33
35 DISALLOW_COPY_AND_ASSIGN(PictureCacheModel); 34 DISALLOW_COPY_AND_ASSIGN(PictureCacheModel);
36 }; 35 };
37 36
38 } // namespace cc 37 } // namespace cc
39 38
40 #endif // CC_TEST_PICTURE_CACHE_MODEL_H_ 39 #endif // CC_TEST_PICTURE_CACHE_MODEL_H_
OLDNEW
« no previous file with comments | « cc/test/fake_scrollbar.cc ('k') | cc/test/picture_cache_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698