OLD | NEW |
(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_ |
OLD | NEW |