Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrGLMakeEGLInterface.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
11
12#include <EGL/egl.h>
13#ifndef GL_GLEXT_PROTOTYPES
14#define GL_GLEXT_PROTOTYPES
15#endif
16#include <GLES2/gl2.h>
17
18static GrGLFuncPtr egl_get_gl_proc(void* ctx, const char name[]) {
19 SkASSERT(nullptr == ctx);
20 #define M(X) if (0 == strcmp(#X, name)) { return (GrGLFuncPtr) X; }
22 #undef M
23 return eglGetProcAddress(name);
24}
25
26namespace GrGLInterfaces {
30} // namespace GrGLInterfaces
31
32#if !defined(SK_DISABLE_LEGACY_EGLINTERFACE_FACTORY)
34#endif
SK_API sk_sp< const GrGLInterface > GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get)
#define GR_GL_CORE_FUNCTIONS_EACH(M)
void(* GrGLFuncPtr)()
sk_sp< const GrGLInterface > GrGLMakeEGLInterface()
#define M(X)
static GrGLFuncPtr egl_get_gl_proc(void *ctx, const char name[])
#define SkASSERT(cond)
Definition SkAssert.h:116
const char * name
Definition fuchsia.cc:50
SK_API sk_sp< const GrGLInterface > MakeEGL()