Flutter Engine
The Flutter Engine
GrGLMakeNativeInterface_glfw.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2016 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 */
7
8
12
13#include <GLFW/glfw3.h>
14
15static GrGLFuncPtr glfw_get(void* ctx, const char name[]) {
16 SkASSERT(nullptr == ctx);
17 SkASSERT(glfwGetCurrentContext());
18 return glfwGetProcAddress(name);
19}
20
22 if (nullptr == glfwGetCurrentContext()) {
23 return nullptr;
24 }
25
26 return GrGLMakeAssembledInterface(nullptr, glfw_get);
27}
SK_API sk_sp< const GrGLInterface > GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get)
void(* GrGLFuncPtr)()
Definition: GrGLInterface.h:17
sk_sp< const GrGLInterface > GrGLMakeNativeInterface()
static GrGLFuncPtr glfw_get(void *ctx, const char name[])
#define SkASSERT(cond)
Definition: SkAssert.h:116
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32