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

Unified 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, 6 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_client_picture_cache.cc
diff --git a/cc/test/fake_client_picture_cache.cc b/cc/test/fake_client_picture_cache.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cf70574205ed6e11d4c7a4e0d7cd2c2014e9ba7a
--- /dev/null
+++ b/cc/test/fake_client_picture_cache.cc
@@ -0,0 +1,37 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/test/fake_client_picture_cache.h"
+
+#include "cc/test/picture_cache_model.h"
+#include "third_party/skia/include/core/SkPicture.h"
+
+namespace cc {
+
+FakeClientPictureCache::FakeClientPictureCache(PictureCacheModel* model)
+ : model_(model) {}
+
+FakeClientPictureCache::~FakeClientPictureCache() = default;
+
+const std::vector<uint32_t>& FakeClientPictureCache::GetAllUsedPictureIds() {
+ return used_picture_ids_;
+}
+
+void FakeClientPictureCache::MarkUsed(uint32_t engine_picture_id) {
+ used_picture_ids_.push_back(engine_picture_id);
+}
+
+sk_sp<const SkPicture> FakeClientPictureCache::GetPicture(uint32_t unique_id) {
+ if (!model_)
+ return nullptr;
+
+ return model_->GetPicture(unique_id);
+}
+
+void FakeClientPictureCache::ApplyCacheUpdate(
+ const std::vector<PictureData>& cache_update) {}
+
+void FakeClientPictureCache::Flush() {}
+
+} // namespace cc
« 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