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

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

Issue 1982893002: [blimp] Add SkPicture caching support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments from vmpstr, including adding //cc/blimp 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
« no previous file with comments | « cc/test/fake_client_picture_cache.h ('k') | cc/test/fake_engine_picture_cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "cc/test/fake_client_picture_cache.h"
6
7 #include "cc/test/picture_cache_model.h"
8 #include "third_party/skia/include/core/SkPicture.h"
9
10 namespace cc {
11
12 FakeClientPictureCache::FakeClientPictureCache(PictureCacheModel* model)
13 : model_(model) {}
14
15 FakeClientPictureCache::~FakeClientPictureCache() = default;
16
17 const std::vector<uint32_t>& FakeClientPictureCache::GetAllUsedPictureIds() {
18 return used_picture_ids_;
19 }
20
21 void FakeClientPictureCache::MarkUsed(uint32_t engine_picture_id) {
22 used_picture_ids_.push_back(engine_picture_id);
23 }
24
25 sk_sp<const SkPicture> FakeClientPictureCache::GetPicture(uint32_t unique_id) {
26 if (!model_)
27 return nullptr;
28
29 return model_->GetPicture(unique_id);
30 }
31
32 void FakeClientPictureCache::ApplyCacheUpdate(
33 const std::vector<PictureData>& cache_update) {}
34
35 void FakeClientPictureCache::Flush() {}
36
37 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_client_picture_cache.h ('k') | cc/test/fake_engine_picture_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698