aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu/gl')
-rw-r--r--tools/gpu/gl/GLTestContext.cpp28
-rw-r--r--tools/gpu/gl/GLTestContext.h2
-rw-r--r--tools/gpu/gl/angle/GLTestContext_angle.cpp2
-rw-r--r--tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp2
-rw-r--r--tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp2
-rw-r--r--tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp2
-rw-r--r--tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm2
-rw-r--r--tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp2
-rw-r--r--tools/gpu/gl/mesa/GLTestContext_mesa.cpp2
-rw-r--r--tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp2
10 files changed, 23 insertions, 23 deletions
diff --git a/tools/gpu/gl/GLTestContext.cpp b/tools/gpu/gl/GLTestContext.cpp
index e6d0e40db8..f6771934f8 100644
--- a/tools/gpu/gl/GLTestContext.cpp
+++ b/tools/gpu/gl/GLTestContext.cpp
@@ -259,28 +259,28 @@ void GLTestContext::finish() {
GrGLint GLTestContext::createTextureRectangle(int width, int height, GrGLenum internalFormat,
GrGLenum externalFormat, GrGLenum externalType,
GrGLvoid* data) {
- if (!(kGL_GrGLStandard == fGL->fStandard && GrGLGetVersion(fGL) >= GR_GL_VER(3, 1)) &&
+ if (!(kGL_GrGLStandard == fGL->fStandard && GrGLGetVersion(fGL.get()) >= GR_GL_VER(3, 1)) &&
!fGL->fExtensions.has("GL_ARB_texture_rectangle")) {
return 0;
}
- if (GrGLGetGLSLVersion(fGL) < GR_GLSL_VER(1, 40)) {
+ if (GrGLGetGLSLVersion(fGL.get()) < GR_GLSL_VER(1, 40)) {
return 0;
}
GrGLuint id;
- GR_GL_CALL(fGL, GenTextures(1, &id));
- GR_GL_CALL(fGL, BindTexture(GR_GL_TEXTURE_RECTANGLE, id));
- GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MAG_FILTER,
- GR_GL_NEAREST));
- GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MIN_FILTER,
- GR_GL_NEAREST));
- GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_S,
- GR_GL_CLAMP_TO_EDGE));
- GR_GL_CALL(fGL, TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_T,
- GR_GL_CLAMP_TO_EDGE));
- GR_GL_CALL(fGL, TexImage2D(GR_GL_TEXTURE_RECTANGLE, 0, internalFormat, width, height, 0,
- externalFormat, externalType, data));
+ GR_GL_CALL(fGL.get(), GenTextures(1, &id));
+ GR_GL_CALL(fGL.get(), BindTexture(GR_GL_TEXTURE_RECTANGLE, id));
+ GR_GL_CALL(fGL.get(), TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MAG_FILTER,
+ GR_GL_NEAREST));
+ GR_GL_CALL(fGL.get(), TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MIN_FILTER,
+ GR_GL_NEAREST));
+ GR_GL_CALL(fGL.get(), TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_S,
+ GR_GL_CLAMP_TO_EDGE));
+ GR_GL_CALL(fGL.get(), TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_T,
+ GR_GL_CLAMP_TO_EDGE));
+ GR_GL_CALL(fGL.get(), TexImage2D(GR_GL_TEXTURE_RECTANGLE, 0, internalFormat, width, height, 0,
+ externalFormat, externalType, data));
return id;
}
} // namespace sk_gpu_test
diff --git a/tools/gpu/gl/GLTestContext.h b/tools/gpu/gl/GLTestContext.h
index a2b04553d3..09dce05685 100644
--- a/tools/gpu/gl/GLTestContext.h
+++ b/tools/gpu/gl/GLTestContext.h
@@ -90,7 +90,7 @@ protected:
private:
/** Subclass provides the gl interface object if construction was
* successful. */
- SkAutoTUnref<const GrGLInterface> fGL;
+ sk_sp<const GrGLInterface> fGL;
typedef TestContext INHERITED;
};
diff --git a/tools/gpu/gl/angle/GLTestContext_angle.cpp b/tools/gpu/gl/angle/GLTestContext_angle.cpp
index 24f722a01f..c3ec431b7e 100644
--- a/tools/gpu/gl/angle/GLTestContext_angle.cpp
+++ b/tools/gpu/gl/angle/GLTestContext_angle.cpp
@@ -147,7 +147,7 @@ ANGLEGLContext::ANGLEGLContext(ANGLEBackend type, ANGLEContextVersion version)
eglMakeCurrent(fDisplay, fSurface, fSurface, fContext);
- SkAutoTUnref<const GrGLInterface> gl(sk_gpu_test::CreateANGLEGLInterface());
+ sk_sp<const GrGLInterface> gl(sk_gpu_test::CreateANGLEGLInterface());
if (nullptr == gl.get()) {
SkDebugf("Could not create ANGLE GL interface!\n");
this->destroyGLContext();
diff --git a/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
index 32e5de4626..888270e41b 100644
--- a/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
+++ b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
@@ -241,7 +241,7 @@ void CommandBufferGLTestContext::initializeGLContext(void *nativeWindow, const i
return;
}
- SkAutoTUnref<const GrGLInterface> gl(create_command_buffer_interface());
+ sk_sp<const GrGLInterface> gl(create_command_buffer_interface());
if (nullptr == gl.get()) {
SkDebugf("Command Buffer: Could not create CommandBuffer GL interface.\n");
this->destroyGLContext();
diff --git a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
index b2517f090e..a281559a6d 100644
--- a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
+++ b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp
@@ -100,7 +100,7 @@ EGLGLTestContext::EGLGLTestContext(GrGLStandard forcedGpuAPI)
}
SkASSERT(forcedGpuAPI == kNone_GrGLStandard || kAPIs[api].fStandard == forcedGpuAPI);
- SkAutoTUnref<const GrGLInterface> gl;
+ sk_sp<const GrGLInterface> gl;
for (; nullptr == gl.get() && api < apiLimit; ++api) {
fDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
diff --git a/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp b/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp
index b8e1996d37..76b6d21661 100644
--- a/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp
+++ b/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp
@@ -221,7 +221,7 @@ GLXGLTestContext::GLXGLTestContext(GrGLStandard forcedGpuAPI, GLXGLTestContext*
return;
}
- SkAutoTUnref<const GrGLInterface> gl(GrGLCreateNativeInterface());
+ sk_sp<const GrGLInterface> gl(GrGLCreateNativeInterface());
if (nullptr == gl.get()) {
SkDebugf("Failed to create gl interface");
this->destroyGLContext();
diff --git a/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm
index f2bcd5d402..4c1aa0119d 100644
--- a/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm
+++ b/tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm
@@ -37,7 +37,7 @@ IOSGLTestContext::IOSGLTestContext()
fEAGLContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
[EAGLContext setCurrentContext:EAGLCTX];
- SkAutoTUnref<const GrGLInterface> gl(GrGLCreateNativeInterface());
+ sk_sp<const GrGLInterface> gl(GrGLCreateNativeInterface());
if (NULL == gl.get()) {
SkDebugf("Failed to create gl interface");
this->destroyGLContext();
diff --git a/tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp b/tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp
index b2cdaacd8a..2a908f8625 100644
--- a/tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp
+++ b/tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp
@@ -60,7 +60,7 @@ MacGLTestContext::MacGLTestContext()
CGLSetCurrentContext(fContext);
- SkAutoTUnref<const GrGLInterface> gl(GrGLCreateNativeInterface());
+ sk_sp<const GrGLInterface> gl(GrGLCreateNativeInterface());
if (nullptr == gl.get()) {
SkDebugf("Context could not create GL interface.\n");
this->destroyGLContext();
diff --git a/tools/gpu/gl/mesa/GLTestContext_mesa.cpp b/tools/gpu/gl/mesa/GLTestContext_mesa.cpp
index e0cf9c198a..1a1c79d27a 100644
--- a/tools/gpu/gl/mesa/GLTestContext_mesa.cpp
+++ b/tools/gpu/gl/mesa/GLTestContext_mesa.cpp
@@ -88,7 +88,7 @@ MesaGLContext::MesaGLContext() : fContext(static_cast<Context>(0)), fImage(nullp
return;
}
- SkAutoTUnref<const GrGLInterface> gl(create_mesa_interface());
+ sk_sp<const GrGLInterface> gl(create_mesa_interface());
if (nullptr == gl.get()) {
SkDebugf("Could not create GL interface!\n");
this->destroyGLContext();
diff --git a/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
index 1b482bc290..a37413ef19 100644
--- a/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
+++ b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
@@ -114,7 +114,7 @@ WinGLTestContext::WinGLTestContext(GrGLStandard forcedGpuAPI)
return;
}
- SkAutoTUnref<const GrGLInterface> gl(GrGLCreateNativeInterface());
+ sk_sp<const GrGLInterface> gl(GrGLCreateNativeInterface());
if (nullptr == gl.get()) {
SkDebugf("Could not create GL interface.\n");
this->destroyGLContext();