From e679a08f9a2b1227d136641cc387c4adc3b7daa7 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 31 Mar 2022 14:26:29 -0400 Subject: [PATCH] Remove GrGLCreateNativeInterface Bug: skia:13087 Change-Id: Ibaf7b223631a7282393cb670779a0a769bd0f86a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526301 Commit-Queue: Brian Salomon Auto-Submit: Brian Salomon Reviewed-by: Greg Daniel Commit-Queue: Greg Daniel --- RELEASE_NOTES.txt | 1 + include/gpu/gl/GrGLInterface.h | 2 -- src/gpu/gl/GrGLGpu.cpp | 5 ----- src/gpu/gl/GrGLMakeNativeInterface_none.cpp | 2 -- src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp | 2 -- src/gpu/gl/glfw/GrGLMakeNativeInterface_glfw.cpp | 2 -- src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp | 2 -- src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp | 2 -- src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp | 2 -- src/gpu/gl/webgl/GrGLMakeNativeInterface_webgl.cpp | 2 -- src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp | 2 -- tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm | 2 +- 12 files changed, 2 insertions(+), 24 deletions(-) diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index e7a8bf1c7f..3a72173010 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -5,6 +5,7 @@ This file includes a list of high level updates for each milestone release. Milestone 102 ------------- * Add glGetFloatv and glSamplerParameterf to GrGLInterface. + * GrGLCreateNativeInterface is removed. Use GrGLMakeNativeInterface. * * * diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h index c28aade61f..e10242b3b7 100644 --- a/include/gpu/gl/GrGLInterface.h +++ b/include/gpu/gl/GrGLInterface.h @@ -31,8 +31,6 @@ struct GrGLInterface; * appropriate one to build. */ SK_API sk_sp GrGLMakeNativeInterface(); -// Deprecated alternative to GrGLMakeNativeInterface(). -SK_API const GrGLInterface* GrGLCreateNativeInterface(); /** * GrContext uses the following interface to make all calls into OpenGL. When a diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index afaabe7267..be96d4f704 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -344,11 +344,6 @@ sk_sp GrGLGpu::Make(sk_sp interface, const GrContext GrDirectContext* direct) { if (!interface) { interface = GrGLMakeNativeInterface(); - // For clients that have written their own GrGLCreateNativeInterface and haven't yet updated - // to GrGLMakeNativeInterface. - if (!interface) { - interface = sk_ref_sp(GrGLCreateNativeInterface()); - } if (!interface) { return nullptr; } diff --git a/src/gpu/gl/GrGLMakeNativeInterface_none.cpp b/src/gpu/gl/GrGLMakeNativeInterface_none.cpp index d4ac8bcfe4..c04571965c 100644 --- a/src/gpu/gl/GrGLMakeNativeInterface_none.cpp +++ b/src/gpu/gl/GrGLMakeNativeInterface_none.cpp @@ -8,5 +8,3 @@ #include "include/gpu/gl/GrGLInterface.h" sk_sp GrGLMakeNativeInterface() { return nullptr; } - -const GrGLInterface* GrGLCreateNativeInterface() { return nullptr; } diff --git a/src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp b/src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp index b1a97d9308..5665d959a5 100644 --- a/src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp +++ b/src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp @@ -9,5 +9,3 @@ #include "include/gpu/gl/egl/GrGLMakeEGLInterface.h" sk_sp GrGLMakeNativeInterface() { return GrGLMakeEGLInterface(); } - -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 a2579688d8..9592476c19 100644 --- a/src/gpu/gl/glfw/GrGLMakeNativeInterface_glfw.cpp +++ b/src/gpu/gl/glfw/GrGLMakeNativeInterface_glfw.cpp @@ -25,5 +25,3 @@ sk_sp GrGLMakeNativeInterface() { 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 2719095c30..c907fd46c9 100644 --- a/src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp +++ b/src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp @@ -9,5 +9,3 @@ #include "include/gpu/gl/glx/GrGLMakeGLXInterface.h" sk_sp GrGLMakeNativeInterface() { return GrGLMakeGLXInterface(); } - -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 54d3af3b51..7616995268 100644 --- a/src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp +++ b/src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp @@ -23,6 +23,4 @@ sk_sp GrGLMakeNativeInterface() { return (GrGLFuncPtr)dlsym(ctx ? ctx : RTLD_DEFAULT, name); }); } -const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); } - #endif // SK_BUILD_FOR_IOS diff --git a/src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp b/src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp index 58c1b0502c..d8d20991cb 100644 --- a/src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp +++ b/src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp @@ -23,6 +23,4 @@ sk_sp GrGLMakeNativeInterface() { return (GrGLFuncPtr)dlsym(ctx ? ctx : RTLD_DEFAULT, name); }); } -const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); } - #endif // SK_BUILD_FOR_MAC diff --git a/src/gpu/gl/webgl/GrGLMakeNativeInterface_webgl.cpp b/src/gpu/gl/webgl/GrGLMakeNativeInterface_webgl.cpp index 79816a9db1..fb9639fb4f 100644 --- a/src/gpu/gl/webgl/GrGLMakeNativeInterface_webgl.cpp +++ b/src/gpu/gl/webgl/GrGLMakeNativeInterface_webgl.cpp @@ -31,5 +31,3 @@ static GrGLFuncPtr webgl_get_gl_proc(void* ctx, const char name[]) { sk_sp GrGLMakeNativeInterface() { return GrGLMakeAssembledInterface(nullptr, webgl_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 08e9f458b0..c34a6f9c85 100644 --- a/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp +++ b/src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp @@ -66,6 +66,4 @@ sk_sp GrGLMakeNativeInterface() { #endif // ARM64 -const GrGLInterface* GrGLCreateNativeInterface() { return GrGLMakeNativeInterface().release(); } - #endif//defined(SK_BUILD_FOR_WIN) diff --git a/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm index ad045bf718..590c1d5fae 100644 --- a/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm +++ b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm @@ -58,7 +58,7 @@ IOSGLTestContext::IOSGLTestContext(IOSGLTestContext* shareContext) SkScopeExit restorer(context_restorer()); [EAGLContext setCurrentContext:fEAGLContext.get()]; - sk_sp gl(GrGLCreateNativeInterface()); + sk_sp gl = GrGLMakeNativeInterface(); if (nullptr == gl.get()) { SkDebugf("Failed to create gl interface"); this->destroyGLContext();