#include "gl/GrGLInterface.h"
#include "gl/GrGLAssembleInterface.h"
#include <GL/glx.h>
static GrGLFuncPtr glx_get(void* ctx, const char name[]) {
SkASSERT(NULL == ctx);
SkASSERT(NULL != glXGetCurrentContext());
return glXGetProcAddress(reinterpret_cast<const GLubyte*>(name));
}
const GrGLInterface* GrGLCreateNativeInterface() {
if (NULL == glXGetCurrentContext()) {
return NULL;
}
return GrGLAssembleGLInterface(NULL, glx_get);
}