Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / gpu / gl / unix / GrGLCreateNativeInterface_unix.cpp
index b3c7a3c..19eec7e 100644 (file)
 
 #include <GL/glx.h>
 
-#define GET_PROC(F) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F)
-#define GET_PROC_SUFFIX(F, S) functions->f ## F = (GrGL ## F ## Proc) get(ctx, "gl" #F #S)
-#define GET_PROC_LOCAL(F) GrGL ## F ## Proc F = (GrGL ## F ## Proc) get(ctx, "gl" #F)
-
-#define GET_LINKED GET_PROC
-#define GET_LINKED_SUFFIX GET_PROC_SUFFIX
-
-#include "gl/GrGLAssembleGLESInterface.h"
-
 static GrGLFuncPtr glx_get(void* ctx, const char name[]) {
     SkASSERT(NULL == ctx);
-    SkASSERT(NULL != glXGetCurrentContext());
+    SkASSERT(glXGetCurrentContext());
     return glXGetProcAddress(reinterpret_cast<const GLubyte*>(name));
 }
 
@@ -32,13 +23,5 @@ const GrGLInterface* GrGLCreateNativeInterface() {
         return NULL;
     }
 
-    const char* verStr = reinterpret_cast<const char*>(glGetString(GR_GL_VERSION));
-    GrGLStandard standard = GrGLGetStandardInUseFromString(verStr);
-
-    if (kGLES_GrGLStandard == standard) {
-        return GrGLAssembleGLESInterface(NULL, glx_get);
-    } else if (kGL_GrGLStandard == standard) {
-        return GrGLAssembleGLInterface(NULL, glx_get);
-    }
-    return NULL;
+    return GrGLAssembleInterface(NULL, glx_get);
 }