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

Side by Side Diff: cc/blimp/engine_picture_cache.h

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/blimp/client_picture_cache.h ('k') | cc/blimp/image_serialization_processor.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 #ifndef CC_BLIMP_ENGINE_PICTURE_CACHE_H_
6 #define CC_BLIMP_ENGINE_PICTURE_CACHE_H_
7
8 #include <vector>
9
10 class SkPicture;
11
12 namespace cc {
13 struct PictureData;
14
15 // EnginePictureCache provides functionaltiy for marking when SkPictures are in
16 // use an when they stop being in use. Based on this, a PictureCacheUpdate can
17 // be retrieved that includes all the new items since last time it was called.
18 // This PictureCacheUpdate is then supposed to be sent to the client.
19 class EnginePictureCache {
20 public:
21 virtual ~EnginePictureCache() {}
22
23 // MarkUsed must be called when an SkPicture needs to available on the client.
24 virtual void MarkUsed(const SkPicture* picture) = 0;
25
26 // Called when a PictureCacheUpdate is going to be sent to the client. This
27 // must contain all the new SkPictures that are in use since last call.
28 virtual std::vector<PictureData> CalculateCacheUpdateAndFlush() = 0;
29 };
30
31 } // namespace cc
32
33 #endif // CC_BLIMP_ENGINE_PICTURE_CACHE_H_
OLDNEW
« no previous file with comments | « cc/blimp/client_picture_cache.h ('k') | cc/blimp/image_serialization_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698