Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
skwasm_support.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_LIB_WEB_UI_SKWASM_SKWASM_SUPPORT_H_
6#define FLUTTER_LIB_WEB_UI_SKWASM_SKWASM_SUPPORT_H_
7
8#include <emscripten/threading.h>
9#include <cinttypes>
11
12namespace Skwasm {
13class Surface;
14}
15
16using SkwasmObject = __externref_t;
17
18extern "C" {
19extern void skwasm_setAssociatedObjectOnThread(unsigned long threadId,
20 void* pointer,
21 SkwasmObject object);
23extern void skwasm_disposeAssociatedObjectOnThread(unsigned long threadId,
24 void* pointer);
25extern void skwasm_registerMessageListener(pthread_t threadId);
26extern void skwasm_syncTimeOriginForThread(pthread_t threadId);
27extern void skwasm_dispatchRenderPictures(unsigned long threadId,
29 sk_sp<SkPicture>* pictures,
30 int count,
31 uint32_t callbackId);
32extern uint32_t skwasm_createOffscreenCanvas(int width, int height);
33extern void skwasm_resizeCanvas(uint32_t contextHandle, int width, int height);
34extern SkwasmObject skwasm_captureImageBitmap(uint32_t contextHandle,
35 int width,
36 int height,
37 SkwasmObject imagePromises);
39 SkwasmObject imagePromises,
40 double rasterStart,
41 uint32_t callbackId);
43 SkwasmObject textureSource,
44 int width,
45 int height);
46}
47
48#endif // FLUTTER_LIB_WEB_UI_SKWASM_SKWASM_SUPPORT_H_
int count
VkSurfaceKHR surface
Definition main.cc:49
int32_t height
int32_t width
void skwasm_disposeAssociatedObjectOnThread(unsigned long threadId, void *pointer)
void skwasm_dispatchRenderPictures(unsigned long threadId, Skwasm::Surface *surface, sk_sp< SkPicture > *pictures, int count, uint32_t callbackId)
SkwasmObject skwasm_getAssociatedObject(void *pointer)
SkwasmObject skwasm_captureImageBitmap(uint32_t contextHandle, int width, int height, SkwasmObject imagePromises)
uint32_t skwasm_createOffscreenCanvas(int width, int height)
void skwasm_setAssociatedObjectOnThread(unsigned long threadId, void *pointer, SkwasmObject object)
void skwasm_resizeCanvas(uint32_t contextHandle, int width, int height)
void skwasm_syncTimeOriginForThread(pthread_t threadId)
void skwasm_resolveAndPostImages(Skwasm::Surface *surface, SkwasmObject imagePromises, double rasterStart, uint32_t callbackId)
__externref_t SkwasmObject
void skwasm_registerMessageListener(pthread_t threadId)
unsigned int skwasm_createGlTextureFromTextureSource(SkwasmObject textureSource, int width, int height)