Flutter Engine
serialization_callbacks.h
Go to the documentation of this file.
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 sk_sp<SkTypeface> DeserializeTypefaceWithoutData(const void* data,
19  size_t length,
20  void* ctx);
21 
22 // Serializes only the metadata of the image and not the underlying pixel data.
23 sk_sp<SkData> SerializeImageWithoutData(SkImage* image, void* ctx);
24 sk_sp<SkImage> DeserializeImageWithoutData(const void* data,
25  size_t length,
26  void* ctx);
27 
28 } // namespace flutter
29 
30 #endif // FLUTTER_SHELL_COMMON_SERIALIZATION_CALLBACKS_H_
sk_sp< SkImage > DeserializeImageWithoutData(const void *data, size_t length, void *ctx)
sk_sp< SkData > SerializeImageWithoutData(SkImage *image, void *ctx)
sk_sp< SkData > SerializeTypefaceWithData(SkTypeface *typeface, void *ctx)
sk_sp< SkTypeface > DeserializeTypefaceWithoutData(const void *data, size_t length, void *ctx)
sk_sp< SkData > SerializeTypefaceWithoutData(SkTypeface *typeface, void *ctx)
size_t length