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" | |
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 BlobId GetBlobId(sk_sp<const SkPicture> picture); | |
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, | |
Kevin M
2016/06/17 17:53:38
Is this used by anything other than the matcher?
nyquist
2016/06/17 21:31:43
Done.
| |
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 |