Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
wrappers.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_WRAPPERS_H_
6#define FLUTTER_LIB_WEB_UI_SKWASM_WRAPPERS_H_
7
8#include <emscripten/html5_webgl.h>
13
14namespace Skwasm {
15
21
22inline void makeCurrent(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE handle) {
23 if (!handle)
24 return;
25
26 int result = emscripten_webgl_make_context_current(handle);
27 if (result != EMSCRIPTEN_RESULT_SUCCESS) {
28 printf("make_context failed: %d", result);
29 }
30}
31
36
37} // namespace Skwasm
38
39#endif // FLUTTER_LIB_WEB_UI_SKWASM_WRAPPERS_H_
GAsyncResult * result
void makeCurrent(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE handle)
Definition wrappers.h:22
sk_sp< skia::textlayout::TypefaceFontProvider > provider
Definition wrappers.h:34
sk_sp< skia::textlayout::FontCollection > collection
Definition wrappers.h:33
sk_sp< GrDirectContext > grContext
Definition wrappers.h:18
sk_sp< SkSurface > surface
Definition wrappers.h:19
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context
Definition wrappers.h:17