#include <surface.h>
Public Types | |
| using | CallbackHandler = void(uint32_t, void *, SkwasmObject) |
Public Member Functions | |
| Surface () | |
| unsigned long | GetThreadId () |
| EMSCRIPTEN_WEBGL_CONTEXT_HANDLE | GetGlContext () |
| void | SetCallbackHandler (CallbackHandler *callback_handler) |
| void | Dispose () |
| uint32_t | SetCanvas (SkwasmObject canvas) |
| void | OnInitialized (uint32_t callback_id) |
| void | ReceiveCanvasOnWorker (SkwasmObject canvas, uint32_t callback_id) |
| uint32_t | SetSize (int width, int height) |
| void | OnResizeComplete (uint32_t callback_id) |
| void | ResizeOnWorker (int width, int height, uint32_t callback_id) |
| uint32_t | RenderPictures (flutter::DisplayList **picture, int count) |
| void | OnRenderComplete (uint32_t callback_id, SkwasmObject image_bitmap) |
| void | RenderPicturesOnWorker (sk_sp< flutter::DisplayList > *picture, int picture_count, uint32_t callback_id, double raster_start) |
| uint32_t | RasterizeImage (flutter::DlImage *image, ImageByteFormat format) |
| void | OnRasterizeComplete (uint32_t callback_id, SkData *data) |
| void | RasterizeImageOnWorker (flutter::DlImage *image, ImageByteFormat format, uint32_t callback_id) |
| uint32_t | TriggerContextLoss () |
| void | OnContextLossTriggered (uint32_t callback_id) |
| void | ReportContextLost (uint32_t callback_id) |
| void | TriggerContextLossOnWorker (uint32_t callback_id) |
| void | OnContextLost () |
| void | SetResourceCacheLimit (int bytes) |
| std::unique_ptr< TextureSourceWrapper > | CreateTextureSourceWrapper (SkwasmObject textureSource) |
| using Skwasm::Surface::CallbackHandler = void(uint32_t, void*, SkwasmObject) |
| Skwasm::Surface::Surface | ( | ) |
Definition at line 44 of file surface.cc.
References skwasm_connectThread(), and skwasm_isSingleThreaded().
| std::unique_ptr< Skwasm::TextureSourceWrapper > Skwasm::Surface::CreateTextureSourceWrapper | ( | SkwasmObject | textureSource | ) |
Definition at line 294 of file surface.cc.
| void Skwasm::Surface::Dispose | ( | ) |
Definition at line 70 of file surface.cc.
References skwasm_destroyContext().
|
inline |
|
inline |
| void Skwasm::Surface::OnContextLossTriggered | ( | uint32_t | callback_id | ) |
Definition at line 263 of file surface.cc.
| void Skwasm::Surface::OnContextLost | ( | ) |
Definition at line 279 of file surface.cc.
References skwasm_reportContextLost().
| void Skwasm::Surface::OnInitialized | ( | uint32_t | callback_id | ) |
Definition at line 85 of file surface.cc.
| void Skwasm::Surface::OnRasterizeComplete | ( | uint32_t | callback_id, |
| SkData * | data | ||
| ) |
Definition at line 214 of file surface.cc.
References data.
| void Skwasm::Surface::OnRenderComplete | ( | uint32_t | callback_id, |
| SkwasmObject | image_bitmap | ||
| ) |
Definition at line 177 of file surface.cc.
| void Skwasm::Surface::OnResizeComplete | ( | uint32_t | callback_id | ) |
Definition at line 138 of file surface.cc.
| uint32_t Skwasm::Surface::RasterizeImage | ( | flutter::DlImage * | image, |
| Skwasm::ImageByteFormat | format | ||
| ) |
Definition at line 204 of file surface.cc.
References format, image, and skwasm_dispatchRasterizeImage().
| void Skwasm::Surface::RasterizeImageOnWorker | ( | flutter::DlImage * | image, |
| Skwasm::ImageByteFormat | format, | ||
| uint32_t | callback_id | ||
| ) |
Definition at line 219 of file surface.cc.
References alpha_type, data, format, image, Skwasm::makeCurrent(), Skwasm::png, Skwasm::rawStraightRgba, and skwasm_postRasterizeResult().
| void Skwasm::Surface::ReceiveCanvasOnWorker | ( | SkwasmObject | canvas, |
| uint32_t | callback_id | ||
| ) |
Definition at line 92 of file surface.cc.
References Skwasm::RenderContext::Make(), Skwasm::makeCurrent(), skwasm_getGlContextForCanvas(), and skwasm_reportInitialized().
| uint32_t Skwasm::Surface::RenderPictures | ( | flutter::DisplayList ** | picture, |
| int | count | ||
| ) |
Definition at line 160 of file surface.cc.
References i, and skwasm_dispatchRenderPictures().
| void Skwasm::Surface::RenderPicturesOnWorker | ( | sk_sp< flutter::DisplayList > * | picture, |
| int | picture_count, | ||
| uint32_t | callback_id, | ||
| double | raster_start | ||
| ) |
Definition at line 183 of file surface.cc.
References i, Skwasm::makeCurrent(), skwasm_captureImageBitmap(), and skwasm_resolveAndPostImages().
| void Skwasm::Surface::ReportContextLost | ( | uint32_t | callback_id | ) |
Definition at line 268 of file surface.cc.
| void Skwasm::Surface::ResizeOnWorker | ( | int | width, |
| int | height, | ||
| uint32_t | callback_id | ||
| ) |
Definition at line 143 of file surface.cc.
References height, skwasm_reportResizeComplete(), and width.
| void Skwasm::Surface::SetCallbackHandler | ( | CallbackHandler * | callback_handler | ) |
Definition at line 65 of file surface.cc.
References callback_handler.
| uint32_t Skwasm::Surface::SetCanvas | ( | SkwasmObject | canvas | ) |
Definition at line 78 of file surface.cc.
References skwasm_dispatchTransferCanvas().
| void Skwasm::Surface::SetResourceCacheLimit | ( | int | bytes | ) |
Definition at line 289 of file surface.cc.
| uint32_t Skwasm::Surface::SetSize | ( | int | width, |
| int | height | ||
| ) |
Definition at line 130 of file surface.cc.
References height, skwasm_dispatchResizeSurface(), and width.
| uint32_t Skwasm::Surface::TriggerContextLoss | ( | ) |
Definition at line 256 of file surface.cc.
References skwasm_dispatchTriggerContextLoss().
| void Skwasm::Surface::TriggerContextLossOnWorker | ( | uint32_t | callback_id | ) |
Definition at line 273 of file surface.cc.
References Skwasm::makeCurrent(), skwasm_reportContextLossTriggered(), and skwasm_triggerContextLossOnCanvas().