aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-12-11 16:36:53 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-11 22:03:38 +0000
commit94f509b5042c29540d0b4ef255798b8daed5ace6 (patch)
tree4e02079f0227014e01ed538ac41c777d9db43e55 /src/gpu
parent2f466242c7289b246d7ef665aa50006cfd11aa36 (diff)
Rename GrGLAssembleFooInterface to GrGLMakeAssembledFooInterface.
Add GrGLAssembleInterface with legacy bare pointer return. This allows existing clients of GrGLAssembleInterface to roll Skia without code changes. Change-Id: I0764a9f4583e554fff5574889adcc6fe004db159 Reviewed-on: https://skia-review.googlesource.com/83564 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/gl/GrGLAssembleInterface.cpp14
-rw-r--r--src/gpu/gl/android/GrGLMakeNativeInterface_android.cpp2
-rw-r--r--src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp2
-rw-r--r--src/gpu/gl/glfw/GrGLMakeNativeInterface_glfw.cpp2
-rw-r--r--src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp2
-rw-r--r--src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp2
-rw-r--r--src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp2
-rw-r--r--src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp4
8 files changed, 17 insertions, 13 deletions
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp
index c5e99015e0..fcb9debc81 100644
--- a/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -15,7 +15,7 @@
#define GET_EGL_PROC_SUFFIX(F, S) functions->fEGL ## F = (GrEGL ## F ## Proc) get(ctx, "egl" #F #S)
-sk_sp<const GrGLInterface> GrGLAssembleInterface(void* ctx, GrGLGetProc get) {
+sk_sp<const GrGLInterface> GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get) {
GET_PROC_LOCAL(GetString);
if (nullptr == GetString) {
return nullptr;
@@ -29,9 +29,9 @@ sk_sp<const GrGLInterface> GrGLAssembleInterface(void* ctx, GrGLGetProc get) {
GrGLStandard standard = GrGLGetStandardInUseFromString(verStr);
if (kGLES_GrGLStandard == standard) {
- return GrGLAssembleGLESInterface(ctx, get);
+ return GrGLMakeAssembledGLESInterface(ctx, get);
} else if (kGL_GrGLStandard == standard) {
- return GrGLAssembleGLInterface(ctx, get);
+ return GrGLMakeAssembledGLInterface(ctx, get);
}
return nullptr;
}
@@ -51,7 +51,7 @@ static void get_egl_query_and_display(GrEGLQueryStringProc* queryString, GrEGLDi
}
}
-sk_sp<const GrGLInterface> GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
+sk_sp<const GrGLInterface> GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc get) {
GET_PROC_LOCAL(GetString);
GET_PROC_LOCAL(GetStringi);
GET_PROC_LOCAL(GetIntegerv);
@@ -546,7 +546,7 @@ sk_sp<const GrGLInterface> GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
return interface;
}
-sk_sp<const GrGLInterface> GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
+sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc get) {
GET_PROC_LOCAL(GetString);
if (nullptr == GetString) {
return nullptr;
@@ -993,3 +993,7 @@ sk_sp<const GrGLInterface> GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get)
return interface;
}
+
+SK_API const GrGLInterface* GrGLAssembleInterface(void *ctx, GrGLGetProc get) {
+ return GrGLMakeAssembledInterface(ctx, get).release();
+}
diff --git a/src/gpu/gl/android/GrGLMakeNativeInterface_android.cpp b/src/gpu/gl/android/GrGLMakeNativeInterface_android.cpp
index 2630e87ba2..d40d7a707a 100644
--- a/src/gpu/gl/android/GrGLMakeNativeInterface_android.cpp
+++ b/src/gpu/gl/android/GrGLMakeNativeInterface_android.cpp
@@ -233,7 +233,7 @@ static GrGLFuncPtr android_get_gl_proc(void* ctx, const char name[]) {
}
sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
- return GrGLAssembleInterface(nullptr, android_get_gl_proc);
+ return GrGLMakeAssembledInterface(nullptr, android_get_gl_proc);
}
const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); }
diff --git a/src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp b/src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp
index 3fbe037b1c..e50d9cd80c 100644
--- a/src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp
+++ b/src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp
@@ -25,7 +25,7 @@ static GrGLFuncPtr egl_get_gl_proc(void* ctx, const char name[]) {
}
sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
- return GrGLAssembleInterface(nullptr, egl_get_gl_proc);
+ return GrGLMakeAssembledInterface(nullptr, egl_get_gl_proc);
}
const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); }
diff --git a/src/gpu/gl/glfw/GrGLMakeNativeInterface_glfw.cpp b/src/gpu/gl/glfw/GrGLMakeNativeInterface_glfw.cpp
index 3873510499..140a4a325e 100644
--- a/src/gpu/gl/glfw/GrGLMakeNativeInterface_glfw.cpp
+++ b/src/gpu/gl/glfw/GrGLMakeNativeInterface_glfw.cpp
@@ -23,7 +23,7 @@ sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
return nullptr;
}
- return GrGLAssembleInterface(nullptr, glfw_get);
+ return GrGLMakeAssembledInterface(nullptr, glfw_get);
}
const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); }
diff --git a/src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp b/src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp
index 4bbbe087a2..c57ec2646d 100644
--- a/src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp
+++ b/src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp
@@ -31,7 +31,7 @@ sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
return nullptr;
}
- return GrGLAssembleInterface(nullptr, glx_get);
+ return GrGLMakeAssembledInterface(nullptr, glx_get);
}
const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); }
diff --git a/src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp b/src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp
index a0a6ac6615..3b7bd7f66f 100644
--- a/src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp
+++ b/src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp
@@ -51,7 +51,7 @@ static GrGLFuncPtr ios_get_gl_proc(void* ctx, const char name[]) {
sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
GLProcGetter getter;
- return GrGLAssembleGLESInterface(&getter, ios_get_gl_proc);
+ return GrGLMakeAssembledGLESInterface(&getter, ios_get_gl_proc);
}
const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); }
diff --git a/src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp b/src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp
index 7220b136c5..a508780f5f 100644
--- a/src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp
+++ b/src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp
@@ -55,7 +55,7 @@ static GrGLFuncPtr mac_get_gl_proc(void* ctx, const char name[]) {
sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
GLProcGetter getter;
- return GrGLAssembleGLInterface(&getter, mac_get_gl_proc);
+ return GrGLMakeAssembledGLInterface(&getter, mac_get_gl_proc);
}
const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); }
diff --git a/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp b/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp
index 77db59a754..00c4b7c3a0 100644
--- a/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp
+++ b/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp
@@ -80,9 +80,9 @@ sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
GrGLStandard standard = GrGLGetStandardInUseFromString(verStr);
if (kGLES_GrGLStandard == standard) {
- return GrGLAssembleGLESInterface(&getter, win_get_gl_proc);
+ return GrGLMakeAssembledGLESInterface(&getter, win_get_gl_proc);
} else if (kGL_GrGLStandard == standard) {
- return GrGLAssembleGLInterface(&getter, win_get_gl_proc);
+ return GrGLMakeAssembledGLInterface(&getter, win_get_gl_proc);
}
return nullptr;
}