Flutter Engine
The Flutter Engine
Functions | Variables
picture.cpp File Reference
#include "export.h"
#include "helpers.h"
#include "third_party/skia/include/core/SkBBHFactory.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "wrappers.h"

Go to the source code of this file.

Functions

SKWASM_EXPORT SkPictureRecorderpictureRecorder_create ()
 
SKWASM_EXPORT void pictureRecorder_dispose (SkPictureRecorder *recorder)
 
SKWASM_EXPORT SkCanvaspictureRecorder_beginRecording (SkPictureRecorder *recorder, const SkRect *cullRect)
 
SKWASM_EXPORT SkPicturepictureRecorder_endRecording (SkPictureRecorder *recorder)
 
SKWASM_EXPORT void picture_getCullRect (SkPicture *picture, SkRect *outRect)
 
SKWASM_EXPORT void picture_dispose (SkPicture *picture)
 
SKWASM_EXPORT uint32_t picture_approximateBytesUsed (SkPicture *picture)
 

Variables

SkRTreeFactory bbhFactory
 

Function Documentation

◆ picture_approximateBytesUsed()

SKWASM_EXPORT uint32_t picture_approximateBytesUsed ( SkPicture picture)

Definition at line 43 of file picture.cpp.

43 {
44 return static_cast<uint32_t>(picture->approximateBytesUsed());
45}
virtual size_t approximateBytesUsed() const =0
sk_sp< const SkPicture > picture
Definition: SkRecords.h:299

◆ picture_dispose()

SKWASM_EXPORT void picture_dispose ( SkPicture picture)

Definition at line 39 of file picture.cpp.

39 {
40 picture->unref();
41}
void unref() const
Definition: SkRefCnt.h:72

◆ picture_getCullRect()

SKWASM_EXPORT void picture_getCullRect ( SkPicture picture,
SkRect outRect 
)

Definition at line 35 of file picture.cpp.

35 {
36 *outRect = picture->cullRect();
37}
virtual SkRect cullRect() const =0

◆ pictureRecorder_beginRecording()

SKWASM_EXPORT SkCanvas * pictureRecorder_beginRecording ( SkPictureRecorder recorder,
const SkRect cullRect 
)

Definition at line 24 of file picture.cpp.

26 {
27 return recorder->beginRecording(*cullRect, &bbhFactory);
28}
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
SkRTreeFactory bbhFactory
Definition: picture.cpp:14

◆ pictureRecorder_create()

SKWASM_EXPORT SkPictureRecorder * pictureRecorder_create ( )

Definition at line 16 of file picture.cpp.

16 {
17 return new SkPictureRecorder();
18}

◆ pictureRecorder_dispose()

SKWASM_EXPORT void pictureRecorder_dispose ( SkPictureRecorder recorder)

Definition at line 20 of file picture.cpp.

20 {
21 delete recorder;
22}

◆ pictureRecorder_endRecording()

SKWASM_EXPORT SkPicture * pictureRecorder_endRecording ( SkPictureRecorder recorder)

Definition at line 30 of file picture.cpp.

31 {
32 return recorder->finishRecordingAsPicture().release();
33}
sk_sp< SkPicture > finishRecordingAsPicture()
T * release()
Definition: SkRefCnt.h:324

Variable Documentation

◆ bbhFactory

SkRTreeFactory bbhFactory

Definition at line 14 of file picture.cpp.