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

Unified Diff: src/gpu/gl/glfw/GrGLCreateNativeInterface_glfw.cpp

Issue 1827153003: Add GLFW support for GrGLCreateNativeInterface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix cmake build Created 4 years, 9 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 | « cmake/CMakeLists.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/glfw/GrGLCreateNativeInterface_glfw.cpp
diff --git a/src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp b/src/gpu/gl/glfw/GrGLCreateNativeInterface_glfw.cpp
similarity index 51%
copy from src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp
copy to src/gpu/gl/glfw/GrGLCreateNativeInterface_glfw.cpp
index e3d37bd80f1efeeab81da681bab29797e4cd186c..e2f6e668cdc4096f209b5eb60c64eabe7119f724 100644
--- a/src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp
+++ b/src/gpu/gl/glfw/GrGLCreateNativeInterface_glfw.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 Google Inc.
+ * Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
@@ -10,18 +10,18 @@
#include "gl/GrGLAssembleInterface.h"
#include "gl/GrGLUtil.h"
-#include <GL/glx.h>
+#include <GLFW/glfw3.h>
-static GrGLFuncPtr glx_get(void* ctx, const char name[]) {
+static GrGLFuncPtr glfw_get(void* ctx, const char name[]) {
SkASSERT(nullptr == ctx);
- SkASSERT(glXGetCurrentContext());
- return glXGetProcAddress(reinterpret_cast<const GLubyte*>(name));
+ SkASSERT(glfwGetCurrentContext());
+ return glfwGetProcAddress(name);
}
const GrGLInterface* GrGLCreateNativeInterface() {
- if (nullptr == glXGetCurrentContext()) {
+ if (nullptr == glfwGetCurrentContext()) {
return nullptr;
}
- return GrGLAssembleInterface(nullptr, glx_get);
+ return GrGLAssembleInterface(nullptr, glfw_get);
}
« no previous file with comments | « cmake/CMakeLists.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698