Flutter Engine
The Flutter Engine
third_party
skia
include
docs
SkMultiPictureDocument.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 Google LLC
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 SkMultiPictureDocument_DEFINED
9
#define SkMultiPictureDocument_DEFINED
10
11
#include "
include/core/SkPicture.h
"
12
#include "
include/core/SkRefCnt.h
"
13
#include "
include/core/SkSize.h
"
14
#include "
include/core/SkTypes.h
"
15
16
#include <functional>
17
18
class
SkDocument
;
19
class
SkStreamSeekable
;
20
class
SkWStream
;
21
struct
SkDeserialProcs
;
22
struct
SkSerialProcs
;
23
24
struct
SkDocumentPage
{
25
sk_sp<SkPicture>
fPicture
;
26
SkSize
fSize
;
27
};
28
29
namespace
SkMultiPictureDocument
{
30
/**
31
* Writes into a file format that is similar to SkPicture::serialize()
32
* Accepts a callback for endPage behavior
33
*/
34
SK_API
sk_sp<SkDocument>
Make
(
SkWStream
*
dst
,
const
SkSerialProcs
* =
nullptr
,
35
std::function
<
void
(
const
SkPicture
*)> onEndPage =
nullptr
);
36
37
/**
38
* Returns the number of pages in the SkMultiPictureDocument.
39
*/
40
SK_API
int
ReadPageCount
(
SkStreamSeekable
*
src
);
41
42
/**
43
* Read the SkMultiPictureDocument into the provided array of pages.
44
* dstArrayCount must equal SkMultiPictureDocumentReadPageCount().
45
* Return false on error.
46
*/
47
SK_API
bool
Read
(
SkStreamSeekable
*
src
,
48
SkDocumentPage
* dstArray,
49
int
dstArrayCount,
50
const
SkDeserialProcs
* =
nullptr
);
51
}
// namespace SkMultiPictureDocument
52
53
#endif
// SkMultiPictureDocument_DEFINED
SK_API
#define SK_API
Definition:
SkAPI.h:35
SkPicture.h
SkRefCnt.h
SkSize.h
SkTypes.h
SkDocument
Definition:
SkDocument.h:32
SkPicture
Definition:
SkPicture.h:44
SkStreamSeekable
Definition:
SkStream.h:166
SkWStream
Definition:
SkStream.h:218
sk_sp< SkPicture >
function
Dart_NativeFunction function
Definition:
fuchsia.cc:51
SkMultiPictureDocument
Definition:
SkMultiPictureDocument.h:29
SkMultiPictureDocument::Make
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
Definition:
SkMultiPictureDocument.cpp:150
SkMultiPictureDocument::Read
SK_API bool Read(SkStreamSeekable *src, SkDocumentPage *dstArray, int dstArrayCount, const SkDeserialProcs *=nullptr)
Definition:
SkMultiPictureDocument.cpp:199
SkMultiPictureDocument::ReadPageCount
SK_API int ReadPageCount(SkStreamSeekable *src)
Definition:
SkMultiPictureDocument.cpp:156
gn.cp.dst
dst
Definition:
cp.py:12
mskp_parser.src
src
Definition:
mskp_parser.py:22
SkDeserialProcs
Definition:
SkSerialProcs.h:97
SkDocumentPage
Definition:
SkMultiPictureDocument.h:24
SkDocumentPage::fPicture
sk_sp< SkPicture > fPicture
Definition:
SkMultiPictureDocument.h:25
SkDocumentPage::fSize
SkSize fSize
Definition:
SkMultiPictureDocument.h:26
SkSerialProcs
Definition:
SkSerialProcs.h:86
SkSize
Definition:
SkSize.h:52
Generated on Sun Jun 23 2024 21:56:02 for Flutter Engine by
1.9.4