2 * Copyright 2014 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
9 #include "gl/GrGLInterface.h"
10 #include "gl/GrGLAssembleInterface.h"
11 #include "gl/GrGLUtil.h"
15 static GrGLFuncPtr glx_get(void* ctx, const char name[]) {
16 SkASSERT(NULL == ctx);
17 SkASSERT(glXGetCurrentContext());
18 return glXGetProcAddress(reinterpret_cast<const GLubyte*>(name));
21 const GrGLInterface* GrGLCreateNativeInterface() {
22 if (NULL == glXGetCurrentContext()) {
26 return GrGLAssembleInterface(NULL, glx_get);