aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-07-02 16:24:41 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-02 20:54:52 +0000
commit389abd50fe74c54a11430f5457d2278cda391132 (patch)
tree876ea2af8d16f5eac64f04f8f0f9de95ecf6d635 /src
parentaae58023a88f9d914e5ef32e2af1262bebbc3d3c (diff)
Simplify GrGLInterface::abandon
Change-Id: I07e0d0670dfc47602394daf68c30d561e543d826 Reviewed-on: https://skia-review.googlesource.com/138995 Commit-Queue: Hal Canary <halcanary@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Auto-Submit: Hal Canary <halcanary@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLInterface.cpp216
1 files changed, 1 insertions, 215 deletions
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index b0b66c0f81..10f0bbe8a6 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -652,221 +652,7 @@ bool GrGLInterface::validate() const {
#if GR_TEST_UTILS
void GrGLInterface::abandon() const {
-
- GrGLInterface* nonConstThis = const_cast<GrGLInterface*>(this);
-
- nonConstThis->fFunctions.fActiveTexture.reset();
- nonConstThis->fFunctions.fAttachShader.reset();
- nonConstThis->fFunctions.fBeginQuery.reset();
- nonConstThis->fFunctions.fBindAttribLocation.reset();
- nonConstThis->fFunctions.fBindBuffer.reset();
- nonConstThis->fFunctions.fBindFragDataLocation.reset();
- nonConstThis->fFunctions.fBindFragDataLocationIndexed.reset();
- nonConstThis->fFunctions.fBindFramebuffer.reset();
- nonConstThis->fFunctions.fBindRenderbuffer.reset();
- nonConstThis->fFunctions.fBindTexture.reset();
- nonConstThis->fFunctions.fBindVertexArray.reset();
- nonConstThis->fFunctions.fBlendBarrier.reset();
- nonConstThis->fFunctions.fBlendColor.reset();
- nonConstThis->fFunctions.fBlendEquation.reset();
- nonConstThis->fFunctions.fBlendFunc.reset();
- nonConstThis->fFunctions.fBlitFramebuffer.reset();
- nonConstThis->fFunctions.fBufferData.reset();
- nonConstThis->fFunctions.fBufferSubData.reset();
- nonConstThis->fFunctions.fCheckFramebufferStatus.reset();
- nonConstThis->fFunctions.fClear.reset();
- nonConstThis->fFunctions.fClearColor.reset();
- nonConstThis->fFunctions.fClearStencil.reset();
- nonConstThis->fFunctions.fClearTexImage.reset();
- nonConstThis->fFunctions.fClearTexSubImage.reset();
- nonConstThis->fFunctions.fColorMask.reset();
- nonConstThis->fFunctions.fCompileShader.reset();
- nonConstThis->fFunctions.fCompressedTexImage2D.reset();
- nonConstThis->fFunctions.fCompressedTexSubImage2D.reset();
- nonConstThis->fFunctions.fCopyTexSubImage2D.reset();
- nonConstThis->fFunctions.fCreateProgram.reset();
- nonConstThis->fFunctions.fCreateShader.reset();
- nonConstThis->fFunctions.fCullFace.reset();
- nonConstThis->fFunctions.fDeleteBuffers.reset();
- nonConstThis->fFunctions.fDeleteFramebuffers.reset();
- nonConstThis->fFunctions.fDeleteProgram.reset();
- nonConstThis->fFunctions.fDeleteQueries.reset();
- nonConstThis->fFunctions.fDeleteRenderbuffers.reset();
- nonConstThis->fFunctions.fDeleteShader.reset();
- nonConstThis->fFunctions.fDeleteTextures.reset();
- nonConstThis->fFunctions.fDeleteVertexArrays.reset();
- nonConstThis->fFunctions.fDepthMask.reset();
- nonConstThis->fFunctions.fDisable.reset();
- nonConstThis->fFunctions.fDisableVertexAttribArray.reset();
- nonConstThis->fFunctions.fDrawArrays.reset();
- nonConstThis->fFunctions.fDrawArraysIndirect.reset();
- nonConstThis->fFunctions.fDrawArraysInstanced.reset();
- nonConstThis->fFunctions.fDrawBuffer.reset();
- nonConstThis->fFunctions.fDrawBuffers.reset();
- nonConstThis->fFunctions.fDrawElements.reset();
- nonConstThis->fFunctions.fDrawElementsIndirect.reset();
- nonConstThis->fFunctions.fDrawElementsInstanced.reset();
- nonConstThis->fFunctions.fDrawRangeElements.reset();
- nonConstThis->fFunctions.fEnable.reset();
- nonConstThis->fFunctions.fEnableVertexAttribArray.reset();
- nonConstThis->fFunctions.fEndQuery.reset();
- nonConstThis->fFunctions.fFinish.reset();
- nonConstThis->fFunctions.fFlush.reset();
- nonConstThis->fFunctions.fFlushMappedBufferRange.reset();
- nonConstThis->fFunctions.fFramebufferRenderbuffer.reset();
- nonConstThis->fFunctions.fFramebufferTexture2D.reset();
- nonConstThis->fFunctions.fFramebufferTexture2DMultisample.reset();
- nonConstThis->fFunctions.fFrontFace.reset();
- nonConstThis->fFunctions.fGenBuffers.reset();
- nonConstThis->fFunctions.fGenFramebuffers.reset();
- nonConstThis->fFunctions.fGenerateMipmap.reset();
- nonConstThis->fFunctions.fGenQueries.reset();
- nonConstThis->fFunctions.fGenRenderbuffers.reset();
- nonConstThis->fFunctions.fGenTextures.reset();
- nonConstThis->fFunctions.fGenVertexArrays.reset();
- nonConstThis->fFunctions.fGetBufferParameteriv.reset();
- nonConstThis->fFunctions.fGetError.reset();
- nonConstThis->fFunctions.fGetFramebufferAttachmentParameteriv.reset();
- nonConstThis->fFunctions.fGetIntegerv.reset();
- nonConstThis->fFunctions.fGetMultisamplefv.reset();
- nonConstThis->fFunctions.fGetProgramBinary.reset();
- nonConstThis->fFunctions.fGetProgramInfoLog.reset();
- nonConstThis->fFunctions.fGetProgramiv.reset();
- nonConstThis->fFunctions.fGetQueryObjecti64v.reset();
- nonConstThis->fFunctions.fGetQueryObjectiv.reset();
- nonConstThis->fFunctions.fGetQueryObjectui64v.reset();
- nonConstThis->fFunctions.fGetQueryObjectuiv.reset();
- nonConstThis->fFunctions.fGetQueryiv.reset();
- nonConstThis->fFunctions.fGetRenderbufferParameteriv.reset();
- nonConstThis->fFunctions.fGetShaderInfoLog.reset();
- nonConstThis->fFunctions.fGetShaderiv.reset();
- nonConstThis->fFunctions.fGetShaderPrecisionFormat.reset();
- nonConstThis->fFunctions.fGetString.reset();
- nonConstThis->fFunctions.fGetStringi.reset();
- nonConstThis->fFunctions.fGetTexLevelParameteriv.reset();
- nonConstThis->fFunctions.fGetUniformLocation.reset();
- nonConstThis->fFunctions.fInsertEventMarker.reset();
- nonConstThis->fFunctions.fInvalidateBufferData.reset();
- nonConstThis->fFunctions.fInvalidateBufferSubData.reset();
- nonConstThis->fFunctions.fInvalidateFramebuffer.reset();
- nonConstThis->fFunctions.fInvalidateSubFramebuffer.reset();
- nonConstThis->fFunctions.fInvalidateTexImage.reset();
- nonConstThis->fFunctions.fInvalidateTexSubImage.reset();
- nonConstThis->fFunctions.fIsTexture.reset();
- nonConstThis->fFunctions.fLineWidth.reset();
- nonConstThis->fFunctions.fLinkProgram.reset();
- nonConstThis->fFunctions.fProgramBinary.reset();
- nonConstThis->fFunctions.fProgramParameteri.reset();
- nonConstThis->fFunctions.fMapBuffer.reset();
- nonConstThis->fFunctions.fMapBufferRange.reset();
- nonConstThis->fFunctions.fMapBufferSubData.reset();
- nonConstThis->fFunctions.fMapTexSubImage2D.reset();
- nonConstThis->fFunctions.fMultiDrawArraysIndirect.reset();
- nonConstThis->fFunctions.fMultiDrawElementsIndirect.reset();
- nonConstThis->fFunctions.fPixelStorei.reset();
- nonConstThis->fFunctions.fPolygonMode.reset();
- nonConstThis->fFunctions.fPopGroupMarker.reset();
- nonConstThis->fFunctions.fPushGroupMarker.reset();
- nonConstThis->fFunctions.fQueryCounter.reset();
- nonConstThis->fFunctions.fRasterSamples.reset();
- nonConstThis->fFunctions.fReadBuffer.reset();
- nonConstThis->fFunctions.fReadPixels.reset();
- nonConstThis->fFunctions.fRenderbufferStorage.reset();
- nonConstThis->fFunctions.fRenderbufferStorageMultisampleES2EXT.reset();
- nonConstThis->fFunctions.fRenderbufferStorageMultisampleES2APPLE.reset();
- nonConstThis->fFunctions.fRenderbufferStorageMultisample.reset();
- nonConstThis->fFunctions.fBindUniformLocation.reset();
- nonConstThis->fFunctions.fResolveMultisampleFramebuffer.reset();
- nonConstThis->fFunctions.fScissor.reset();
- nonConstThis->fFunctions.fShaderSource.reset();
- nonConstThis->fFunctions.fStencilFunc.reset();
- nonConstThis->fFunctions.fStencilFuncSeparate.reset();
- nonConstThis->fFunctions.fStencilMask.reset();
- nonConstThis->fFunctions.fStencilMaskSeparate.reset();
- nonConstThis->fFunctions.fStencilOp.reset();
- nonConstThis->fFunctions.fStencilOpSeparate.reset();
- nonConstThis->fFunctions.fTexBuffer.reset();
- nonConstThis->fFunctions.fTexBufferRange.reset();
- nonConstThis->fFunctions.fTexImage2D.reset();
- nonConstThis->fFunctions.fTexParameteri.reset();
- nonConstThis->fFunctions.fTexParameteriv.reset();
- nonConstThis->fFunctions.fTexSubImage2D.reset();
- nonConstThis->fFunctions.fTexStorage2D.reset();
- nonConstThis->fFunctions.fTextureBarrier.reset();
- nonConstThis->fFunctions.fDiscardFramebuffer.reset();
- nonConstThis->fFunctions.fUniform1f.reset();
- nonConstThis->fFunctions.fUniform1i.reset();
- nonConstThis->fFunctions.fUniform1fv.reset();
- nonConstThis->fFunctions.fUniform1iv.reset();
- nonConstThis->fFunctions.fUniform2f.reset();
- nonConstThis->fFunctions.fUniform2i.reset();
- nonConstThis->fFunctions.fUniform2fv.reset();
- nonConstThis->fFunctions.fUniform2iv.reset();
- nonConstThis->fFunctions.fUniform3f.reset();
- nonConstThis->fFunctions.fUniform3i.reset();
- nonConstThis->fFunctions.fUniform3fv.reset();
- nonConstThis->fFunctions.fUniform3iv.reset();
- nonConstThis->fFunctions.fUniform4f.reset();
- nonConstThis->fFunctions.fUniform4i.reset();
- nonConstThis->fFunctions.fUniform4fv.reset();
- nonConstThis->fFunctions.fUniform4iv.reset();
- nonConstThis->fFunctions.fUniformMatrix2fv.reset();
- nonConstThis->fFunctions.fUniformMatrix3fv.reset();
- nonConstThis->fFunctions.fUniformMatrix4fv.reset();
- nonConstThis->fFunctions.fUnmapBuffer.reset();
- nonConstThis->fFunctions.fUnmapBufferSubData.reset();
- nonConstThis->fFunctions.fUnmapTexSubImage2D.reset();
- nonConstThis->fFunctions.fUseProgram.reset();
- nonConstThis->fFunctions.fVertexAttrib1f.reset();
- nonConstThis->fFunctions.fVertexAttrib2fv.reset();
- nonConstThis->fFunctions.fVertexAttrib3fv.reset();
- nonConstThis->fFunctions.fVertexAttrib4fv.reset();
- nonConstThis->fFunctions.fVertexAttribDivisor.reset();
- nonConstThis->fFunctions.fVertexAttribIPointer.reset();
- nonConstThis->fFunctions.fVertexAttribPointer.reset();
- nonConstThis->fFunctions.fViewport.reset();
- nonConstThis->fFunctions.fMatrixLoadf.reset();
- nonConstThis->fFunctions.fMatrixLoadIdentity.reset();
- nonConstThis->fFunctions.fGetProgramResourceLocation.reset();
- nonConstThis->fFunctions.fPathCommands.reset();
- nonConstThis->fFunctions.fPathParameteri.reset();
- nonConstThis->fFunctions.fPathParameterf.reset();
- nonConstThis->fFunctions.fGenPaths.reset();
- nonConstThis->fFunctions.fDeletePaths.reset();
- nonConstThis->fFunctions.fIsPath.reset();
- nonConstThis->fFunctions.fPathStencilFunc.reset();
- nonConstThis->fFunctions.fStencilFillPath.reset();
- nonConstThis->fFunctions.fStencilStrokePath.reset();
- nonConstThis->fFunctions.fStencilFillPathInstanced.reset();
- nonConstThis->fFunctions.fStencilStrokePathInstanced.reset();
- nonConstThis->fFunctions.fCoverFillPath.reset();
- nonConstThis->fFunctions.fCoverStrokePath.reset();
- nonConstThis->fFunctions.fCoverFillPathInstanced.reset();
- nonConstThis->fFunctions.fCoverStrokePathInstanced.reset();
- nonConstThis->fFunctions.fStencilThenCoverFillPath.reset();
- nonConstThis->fFunctions.fStencilThenCoverStrokePath.reset();
- nonConstThis->fFunctions.fStencilThenCoverFillPathInstanced.reset();
- nonConstThis->fFunctions.fStencilThenCoverStrokePathInstanced.reset();
- nonConstThis->fFunctions.fProgramPathFragmentInputGen.reset();
- nonConstThis->fFunctions.fBindFragmentInputLocation.reset();
- nonConstThis->fFunctions.fCoverageModulation.reset();
- nonConstThis->fFunctions.fMinSampleShading.reset();
- nonConstThis->fFunctions.fFenceSync.reset();
- nonConstThis->fFunctions.fIsSync.reset();
- nonConstThis->fFunctions.fClientWaitSync.reset();
- nonConstThis->fFunctions.fWaitSync.reset();
- nonConstThis->fFunctions.fDeleteSync.reset();
- nonConstThis->fFunctions.fGetInternalformativ.reset();
- nonConstThis->fFunctions.fDebugMessageControl.reset();
- nonConstThis->fFunctions.fDebugMessageInsert.reset();
- nonConstThis->fFunctions.fDebugMessageCallback.reset();
- nonConstThis->fFunctions.fGetDebugMessageLog.reset();
- nonConstThis->fFunctions.fPushDebugGroup.reset();
- nonConstThis->fFunctions.fPopDebugGroup.reset();
- nonConstThis->fFunctions.fObjectLabel.reset();
- nonConstThis->fFunctions.fWindowRectangles.reset();
- nonConstThis->fFunctions.fEGLCreateImage.reset();
- nonConstThis->fFunctions.fEGLDestroyImage.reset();
+ const_cast<GrGLInterface*>(this)->fFunctions = GrGLInterface::Functions();
}
#endif // GR_TEST_UTILS