Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: src/gpu/gl/egl/GrGLCreateNativeInterface_egl.cpp

Issue 543363004: Add support for EGL on linux (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/android/SkNativeGLContext_android.cpp ('k') | src/gpu/gl/egl/SkNativeGLContext_egl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/gpu/gl/android/SkNativeGLContext_android.cpp ('k') | src/gpu/gl/egl/SkNativeGLContext_egl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698