forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserialization_callbacks.h
27 lines (20 loc) · 1.01 KB
/
serialization_callbacks.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_COMMON_SERIALIZATION_CALLBACKS_H_
#define FLUTTER_SHELL_COMMON_SERIALIZATION_CALLBACKS_H_
#include "flutter/fml/logging.h"
#include "include/core/SkImage.h"
#include "include/core/SkPicture.h"
#include "include/core/SkStream.h"
#include "include/core/SkTypeface.h"
namespace flutter {
sk_sp<SkData> SerializeTypefaceWithoutData(SkTypeface* typeface, void* ctx);
sk_sp<SkData> SerializeTypefaceWithData(SkTypeface* typeface, void* ctx);
// Serializes only the metadata of the image and not the underlying pixel data.
sk_sp<SkData> SerializeImageWithoutData(SkImage* image, void* ctx);
sk_sp<SkImage> DeserializeImageWithoutData(const void* data,
size_t length,
void* ctx);
} // namespace flutter
#endif // FLUTTER_SHELL_COMMON_SERIALIZATION_CALLBACKS_H_