18 PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT =
19 (PFNEGLGETPLATFORMDISPLAYEXTPROC)eglGetProcAddress(
"eglGetPlatformDisplayEXT");
22 if (!eglGetPlatformDisplayEXT) {
27 if (EGL_NO_DISPLAY == fDisplay) {
33 if (!eglInitialize(fDisplay, &majorVersion, &minorVersion)) {
34 SkDebugf(
"Could not initialize display!\n");
41 const EGLint configAttribs[] = {EGL_RENDERABLE_TYPE,
58 EGLConfig surfaceConfig;
59 if (!eglChooseConfig(fDisplay, configAttribs, &surfaceConfig, 1, &numConfigs)) {
60 SkDebugf(
"Could not create choose config!\n");
64 const EGLint contextAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE};
65 fEGLContext = eglCreateContext(fDisplay, surfaceConfig,
nullptr, contextAttribs);
66 if (EGL_NO_CONTEXT == fEGLContext) {
67 SkDebugf(
"Could not create context!\n");
71 eglCreateWindowSurface(fDisplay, surfaceConfig, this->
onGetNativeWindow(),
nullptr);
72 if (EGL_NO_SURFACE == fEGLSurface) {
73 SkDebugf(
"Could not create surface!\n");
76 if (!eglMakeCurrent(fDisplay, fEGLSurface, fEGLSurface, fEGLContext)) {
77 SkDebugf(
"Could not make context current!\n");
101 eglMakeCurrent(fDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
102 if (EGL_NO_CONTEXT != fEGLContext) {
103 eglDestroyContext(fDisplay, fEGLContext);
105 if (EGL_NO_SURFACE != fEGLSurface) {
106 eglDestroySurface(fDisplay, fEGLSurface);
108 if (EGL_NO_DISPLAY != fDisplay) {
109 eglTerminate(fDisplay);
114 if (!eglSwapBuffers(fDisplay, fEGLSurface)) {
115 SkDebugf(
"Could not complete eglSwapBuffers.\n");
SK_API sk_sp< const GrGLInterface > GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get)
#define GR_GL_STENCIL_BUFFER_BIT
#define GR_GL_COLOR_BUFFER_BIT
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
const DisplayParams & getDisplayParams()
void onDestroyContext() override
void onSwapBuffers() override
virtual SkISize onGetSize() const =0
~ANGLEWindowContext() override
virtual int onGetStencilBits() const =0
virtual EGLDisplay onGetEGLDisplay(PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT) const =0
virtual NativeWindowType onGetNativeWindow() const =0
sk_sp< const GrGLInterface > onInitializeContext() override
DEF_SWITCHES_START aot vmservice shared library name
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
GrGLFunction< GrGLViewportFn > fViewport
GrGLFunction< GrGLClearStencilFn > fClearStencil
GrGLFunction< GrGLClearColorFn > fClearColor
GrGLFunction< GrGLStencilMaskFn > fStencilMask
GrGLFunction< GrGLClearFn > fClear
struct GrGLInterface::Functions fFunctions
constexpr int32_t width() const