xref: /aosp_15_r20/external/skia/modules/skottie/utils/TextPreshape.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 /*
2  * Copyright 2024 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkottieTextPreshape_DEFINED
9 #define SkottieTextPreshape_DEFINED
10 
11 #include <cstddef>
12 
13 #include "include/core/SkRefCnt.h"
14 
15 class SkData;
16 class SkFontMgr;
17 class SkWStream;
18 
19 namespace skresources { class ResourceProvider; }
20 namespace SkShapers { class Factory; }
21 
22 namespace skottie_utils {
23 
24 bool Preshape(const char* json, size_t size, SkWStream*,
25               const sk_sp<SkFontMgr>&,
26               const sk_sp<SkShapers::Factory>&,
27               const sk_sp<skresources::ResourceProvider>&);
28 
29 bool Preshape(const sk_sp<SkData>&, SkWStream*,
30               const sk_sp<SkFontMgr>&,
31               const sk_sp<SkShapers::Factory>&,
32               const sk_sp<skresources::ResourceProvider>&);
33 
34 } //  namespace skottie_utils
35 
36 #endif //  SkottieTextPreshape_DEFINED
37