5#ifndef FLUTTER_LIB_WEB_UI_SKWASM_SURFACE_H_
6#define FLUTTER_LIB_WEB_UI_SKWASM_SURFACE_H_
9#include <GLES2/gl2ext.h>
10#include <emscripten.h>
11#include <emscripten/html5_webgl.h>
12#include <emscripten/threading.h>
13#include <webgl/webgl1.h>
16#include "third_party/skia/include/core/SkCanvas.h"
17#include "third_party/skia/include/core/SkColorSpace.h"
18#include "third_party/skia/include/core/SkSurface.h"
19#include "third_party/skia/include/encode/SkPngEncoder.h"
20#include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
21#include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h"
22#include "third_party/skia/include/gpu/ganesh/gl/GrGLInterface.h"
23#include "third_party/skia/include/gpu/ganesh/gl/GrGLTypes.h"
47 unsigned long _rasterThreadId;
89 void _recreateSurface();
92 uint32_t _currentCallbackId = 0;
95 int _canvasHeight = 0;
97 EMSCRIPTEN_WEBGL_CONTEXT_HANDLE _glContext = 0;
98 sk_sp<GrDirectContext> _grContext =
nullptr;
99 sk_sp<SkSurface> _surface =
nullptr;
100 GrGLFramebufferInfo _fbInfo;
101 GrGLint _sampleCount;
106 bool _isInitialized =
false;
unsigned long getThreadId()
void onRasterizeComplete(uint32_t callbackId, SkData *data)
void renderPicturesOnWorker(sk_sp< flutter::DisplayList > *picture, int width, int height, int pictureCount, uint32_t callbackId, double rasterStart)
void setResourceCacheLimit(int bytes)
std::unique_ptr< TextureSourceWrapper > createTextureSourceWrapper(SkwasmObject textureSource)
uint32_t rasterizeImage(SkImage *image, ImageByteFormat format)
void(uint32_t, void *, SkwasmObject) CallbackHandler
uint32_t renderPictures(flutter::DisplayList **picture, int width, int height, int count)
void onRenderComplete(uint32_t callbackId, SkwasmObject imageBitmap)
void rasterizeImageOnWorker(SkImage *image, ImageByteFormat format, uint32_t callbackId)
void setCallbackHandler(CallbackHandler *callbackHandler)
TextureSourceWrapper(unsigned long threadId, SkwasmObject textureSource)
SkwasmObject getTextureSource()
FlutterVulkanImage * image
__externref_t SkwasmObject
flutter::DisplayList DisplayList
std::shared_ptr< const fml::Mapping > data