Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
ganesh
gl
glfw
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
9
#include "
include/gpu/gl/GrGLAssembleInterface.h
"
10
#include "
include/gpu/gl/GrGLInterface.h
"
11
#include "
src/gpu/ganesh/gl/GrGLUtil.h
"
12
13
#include <GLFW/glfw3.h>
14
15
static
GrGLFuncPtr
glfw_get
(
void
* ctx,
const
char
name
[]) {
16
SkASSERT
(
nullptr
== ctx);
17
SkASSERT
(glfwGetCurrentContext());
18
return
glfwGetProcAddress(
name
);
19
}
20
21
sk_sp<const GrGLInterface>
GrGLMakeNativeInterface
() {
22
if
(
nullptr
== glfwGetCurrentContext()) {
23
return
nullptr
;
24
}
25
26
return
GrGLMakeAssembledInterface
(
nullptr
,
glfw_get
);
27
}
GrGLAssembleInterface.h
GrGLMakeAssembledInterface
SK_API sk_sp< const GrGLInterface > GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get)
Definition
GrGLAssembleInterface.cpp:16
GrGLInterface.h
GrGLFuncPtr
void(* GrGLFuncPtr)()
Definition
GrGLInterface.h:17
GrGLMakeNativeInterface
sk_sp< const GrGLInterface > GrGLMakeNativeInterface()
Definition
GrGLMakeNativeInterface_glfw.cpp:21
glfw_get
static GrGLFuncPtr glfw_get(void *ctx, const char name[])
Definition
GrGLMakeNativeInterface_glfw.cpp:15
GrGLUtil.h
SkASSERT
#define SkASSERT(cond)
Definition
SkAssert.h:116
sk_sp
Definition
SkRefCnt.h:220
name
const char * name
Definition
fuchsia.cc:50
Generated on Fri Apr 26 2024 06:16:59 for Flutter Engine by
1.9.8