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

Side by Side Diff: cc/test/fake_client_picture_cache.cc

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_client_picture_cache.h ('k') | cc/test/fake_content_layer_client.h » ('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 #include "cc/test/fake_client_picture_cache.h" 5 #include "cc/test/fake_client_picture_cache.h"
6 6
7 #include "cc/test/picture_cache_model.h" 7 #include "cc/test/picture_cache_model.h"
8 #include "third_party/skia/include/core/SkPicture.h" 8 #include "skia/ext/cdl_picture.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 FakeClientPictureCache::FakeClientPictureCache(PictureCacheModel* model) 12 FakeClientPictureCache::FakeClientPictureCache(PictureCacheModel* model)
13 : model_(model) {} 13 : model_(model) {}
14 14
15 FakeClientPictureCache::~FakeClientPictureCache() = default; 15 FakeClientPictureCache::~FakeClientPictureCache() = default;
16 16
17 const std::vector<uint32_t>& FakeClientPictureCache::GetAllUsedPictureIds() { 17 const std::vector<uint32_t>& FakeClientPictureCache::GetAllUsedPictureIds() {
18 return used_picture_ids_; 18 return used_picture_ids_;
19 } 19 }
20 20
21 void FakeClientPictureCache::MarkUsed(uint32_t engine_picture_id) { 21 void FakeClientPictureCache::MarkUsed(uint32_t engine_picture_id) {
22 used_picture_ids_.push_back(engine_picture_id); 22 used_picture_ids_.push_back(engine_picture_id);
23 } 23 }
24 24
25 sk_sp<const SkPicture> FakeClientPictureCache::GetPicture(uint32_t unique_id) { 25 sk_sp<const CdlPicture> FakeClientPictureCache::GetPicture(uint32_t unique_id) {
26 if (!model_) 26 if (!model_)
27 return nullptr; 27 return nullptr;
28 28
29 return model_->GetPicture(unique_id); 29 return model_->GetPicture(unique_id);
30 } 30 }
31 31
32 void FakeClientPictureCache::ApplyCacheUpdate( 32 void FakeClientPictureCache::ApplyCacheUpdate(
33 const std::vector<PictureData>& cache_update) {} 33 const std::vector<PictureData>& cache_update) {}
34 34
35 void FakeClientPictureCache::Flush() {} 35 void FakeClientPictureCache::Flush() {}
36 36
37 } // namespace cc 37 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_client_picture_cache.h ('k') | cc/test/fake_content_layer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698