Chromium Code Reviews| 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 BLIMP_TEST_SUPPORT_COMPOSITOR_PICTURE_CACHE_TEST_SUPPORT_H_ | |
| 6 #define BLIMP_TEST_SUPPORT_COMPOSITOR_PICTURE_CACHE_TEST_SUPPORT_H_ | |
| 7 | |
| 8 #include "blimp/common/blob_cache/blob_cache.h" | |
| 9 #include "cc/proto/picture_cache.h" | |
|
Kevin M
2016/06/11 00:29:33
A lot of these can be turned into prototypes
nyquist
2016/06/14 01:37:57
I'm not sure I understand what you want me to do w
| |
| 10 #include "third_party/skia/include/core/SkColor.h" | |
| 11 #include "third_party/skia/include/core/SkPicture.h" | |
| 12 #include "third_party/skia/include/core/SkRefCnt.h" | |
| 13 | |
| 14 namespace blimp { | |
| 15 | |
| 16 // Creates an SkPicture filled with with the given |color|. | |
| 17 sk_sp<const SkPicture> CreateSkPicture(SkColor color); | |
| 18 | |
| 19 // Serializes the given picture into an SkData object. | |
| 20 sk_sp<SkData> SerializePicture(sk_sp<const SkPicture> picture); | |
| 21 | |
| 22 // Serializes an SkPicture and returns the BlobId for the serialized form of | |
| 23 // the picture. | |
| 24 const BlobId GetBlobId(sk_sp<const SkPicture> picture); | |
|
Kevin M
2016/06/11 00:29:33
Why return a const value type...?
nyquist
2016/06/14 01:37:57
Done.
| |
| 25 | |
| 26 // Deserializes the SkPicture represented by |data. | |
| 27 sk_sp<const SkPicture> DeserializePicture(sk_sp<SkData> data); | |
| 28 | |
| 29 // Compares an SkPicture and SkPicture represented by the SkData in the | |
| 30 // cc::PictureData. | |
| 31 bool SamePicture(sk_sp<const SkPicture> picture, | |
| 32 const cc::PictureData& picture_data); | |
| 33 | |
| 34 // Utility function to create a valid cc::PictureData from an SkPicture. | |
| 35 cc::PictureData CreatePictureData(sk_sp<const SkPicture> picture); | |
| 36 | |
| 37 } // namespace blimp | |
| 38 | |
| 39 #endif // BLIMP_TEST_SUPPORT_COMPOSITOR_PICTURE_CACHE_TEST_SUPPORT_H_ | |
| OLD | NEW |