| Index: src/gpu/gl/egl/GrGLCreateNativeInterface_egl.cpp
|
| diff --git a/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp b/src/gpu/gl/egl/GrGLCreateNativeInterface_egl.cpp
|
| similarity index 51%
|
| copy from src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp
|
| copy to src/gpu/gl/egl/GrGLCreateNativeInterface_egl.cpp
|
| index 19eec7e8acea66ea78ddce2d7102c2432a6c10e2..ddc9e693a4d6825d9e6a29c7bb73a3733d3b5026 100644
|
| --- a/src/gpu/gl/unix/GrGLCreateNativeInterface_unix.cpp
|
| +++ b/src/gpu/gl/egl/GrGLCreateNativeInterface_egl.cpp
|
| @@ -1,27 +1,22 @@
|
| +
|
| /*
|
| * Copyright 2014 Google Inc.
|
| *
|
| * Use of this source code is governed by a BSD-style license that can be
|
| * found in the LICENSE file.
|
| */
|
| -
|
| -
|
| #include "gl/GrGLInterface.h"
|
| #include "gl/GrGLAssembleInterface.h"
|
| #include "gl/GrGLUtil.h"
|
|
|
| -#include <GL/glx.h>
|
| +#include <EGL/egl.h>
|
| +#include <GLES2/gl2.h>
|
|
|
| -static GrGLFuncPtr glx_get(void* ctx, const char name[]) {
|
| +static GrGLFuncPtr egl_get_gl_proc(void* ctx, const char name[]) {
|
| SkASSERT(NULL == ctx);
|
| - SkASSERT(glXGetCurrentContext());
|
| - return glXGetProcAddress(reinterpret_cast<const GLubyte*>(name));
|
| + return eglGetProcAddress(name);
|
| }
|
|
|
| const GrGLInterface* GrGLCreateNativeInterface() {
|
| - if (NULL == glXGetCurrentContext()) {
|
| - return NULL;
|
| - }
|
| -
|
| - return GrGLAssembleInterface(NULL, glx_get);
|
| + return GrGLAssembleInterface(NULL, egl_get_gl_proc);
|
| }
|
|
|