Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
image.cc File Reference

Go to the source code of this file.

Functions

SKWASM_EXPORT flutter::DlImageimage_createFromPicture (flutter::DisplayList *display_list, int32_t width, int32_t height)
 
SKWASM_EXPORT flutter::DlImageimage_createFromPixels (SkData *data, int width, int height, Skwasm::PixelFormat pixel_format, size_t row_byte_count)
 
SKWASM_EXPORT flutter::DlImageimage_createFromTextureSource (SkwasmObject texture_source, int width, int height, Skwasm::Surface *surface)
 
SKWASM_EXPORT void image_ref (flutter::DlImage *image)
 
SKWASM_EXPORT void image_dispose (flutter::DlImage *image)
 
SKWASM_EXPORT int image_getWidth (flutter::DlImage *image)
 
SKWASM_EXPORT int image_getHeight (flutter::DlImage *image)
 

Function Documentation

◆ image_createFromPicture()

SKWASM_EXPORT flutter::DlImage * image_createFromPicture ( flutter::DisplayList display_list,
int32_t  width,
int32_t  height 
)

Definition at line 12 of file image.cc.

15 {
17 return Skwasm::MakeImageFromPicture(display_list, width, height).release();
18}
uint32_t live_image_count
sk_sp< flutter::DlImage > MakeImageFromPicture(flutter::DisplayList *display_list, int32_t width, int32_t height)
int32_t height
int32_t width

References height, Skwasm::live_image_count, Skwasm::MakeImageFromPicture(), and width.

◆ image_createFromPixels()

SKWASM_EXPORT flutter::DlImage * image_createFromPixels ( SkData *  data,
int  width,
int  height,
Skwasm::PixelFormat  pixel_format,
size_t  row_byte_count 
)

Definition at line 20 of file image.cc.

25 {
27 return Skwasm::MakeImageFromPixels(data, width, height, pixel_format,
28 row_byte_count)
29 .release();
30}
sk_sp< flutter::DlImage > MakeImageFromPixels(SkData *data, int width, int height, PixelFormat pixel_format, size_t row_byte_count)
std::shared_ptr< const fml::Mapping > data

References data, height, Skwasm::live_image_count, Skwasm::MakeImageFromPixels(), and width.

◆ image_createFromTextureSource()

SKWASM_EXPORT flutter::DlImage * image_createFromTextureSource ( SkwasmObject  texture_source,
int  width,
int  height,
Skwasm::Surface surface 
)

Definition at line 32 of file image.cc.

36 {
38 return Skwasm::MakeImageFromTexture(texture_source, width, height, surface)
39 .release();
40}
sk_sp< flutter::DlImage > MakeImageFromTexture(SkwasmObject texture_source, int width, int height, Skwasm::Surface *surface)

References height, Skwasm::live_image_count, Skwasm::MakeImageFromTexture(), surface, and width.

◆ image_dispose()

SKWASM_EXPORT void image_dispose ( flutter::DlImage image)

Definition at line 47 of file image.cc.

47 {
49 image->unref();
50}
FlutterVulkanImage * image

References image, and Skwasm::live_image_count.

◆ image_getHeight()

SKWASM_EXPORT int image_getHeight ( flutter::DlImage image)

Definition at line 56 of file image.cc.

56 {
57 return image->height();
58}

References image.

◆ image_getWidth()

SKWASM_EXPORT int image_getWidth ( flutter::DlImage image)

Definition at line 52 of file image.cc.

52 {
53 return image->width();
54}

References image.

◆ image_ref()

SKWASM_EXPORT void image_ref ( flutter::DlImage image)

Definition at line 42 of file image.cc.

42 {
44 image->ref();
45}

References image, and Skwasm::live_image_count.