1 | // Copyright 2013 The Flutter 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 FLUTTER_SHELL_COMMON_SERIALIZATION_CALLBACKS_H_ |
6 | #define FLUTTER_SHELL_COMMON_SERIALIZATION_CALLBACKS_H_ |
7 | |
8 | #include "flutter/fml/logging.h" |
9 | #include "include/core/SkImage.h" |
10 | #include "include/core/SkPicture.h" |
11 | #include "include/core/SkStream.h" |
12 | #include "include/core/SkTypeface.h" |
13 | |
14 | namespace flutter { |
15 | |
16 | sk_sp<SkData> SerializeTypefaceWithoutData(SkTypeface* typeface, void* ctx); |
17 | sk_sp<SkData> SerializeTypefaceWithData(SkTypeface* typeface, void* ctx); |
18 | |
19 | // Serializes only the metadata of the image and not the underlying pixel data. |
20 | sk_sp<SkData> SerializeImageWithoutData(SkImage* image, void* ctx); |
21 | sk_sp<SkImage> DeserializeImageWithoutData(const void* data, |
22 | size_t length, |
23 | void* ctx); |
24 | |
25 | } // namespace flutter |
26 | |
27 | #endif // FLUTTER_SHELL_COMMON_SERIALIZATION_CALLBACKS_H_ |
28 | |