| 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);
|
| }
|
|
|