aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/win
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-12-11 10:06:31 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-11 17:54:38 +0000
commit3d6801eeee6b036de9f8d09e2ae8fa99df5a397c (patch)
treecbdcd23fe4924fbe25afae209d01bb6527244abf /src/gpu/gl/win
parentd67e5189802e89e74217244b36cc7263883d5dba (diff)
Add GrGLMakeNativeInterface factory that returns sk_sp<const GrGLInterface>.
Removes the concept of a configurable "default" interface and makes the default always be the "native" interface. Also removes unused functions: GrGLInterfaceAddTestDebugMarker and GrGLInterface::NewClone. Keeps around legacy GrGLCreateNativeInterface() until clients can be weened. Change-Id: I4a3bdafa8cf8c68ed13318393abd55686b045ccb Reviewed-on: https://skia-review.googlesource.com/83000 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl/win')
-rw-r--r--src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp (renamed from src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp)4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp b/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp
index 5f26fdde34..77db59a754 100644
--- a/src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp
+++ b/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp
@@ -62,7 +62,7 @@ static GrGLFuncPtr win_get_gl_proc(void* ctx, const char name[]) {
* This implementation will only work if GR_GL_FUNCTION_TYPE is __stdcall.
* Otherwise, a springboard would be needed that hides the calling convention.
*/
-const GrGLInterface* GrGLCreateNativeInterface() {
+sk_sp<const GrGLInterface> GrGLMakeNativeInterface() {
if (nullptr == wglGetCurrentContext()) {
return nullptr;
}
@@ -87,4 +87,6 @@ const GrGLInterface* GrGLCreateNativeInterface() {
return nullptr;
}
+const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); }
+
#endif//defined(SK_BUILD_FOR_WIN32)