diff options
author | 2018-06-22 09:48:38 -0400 | |
---|---|---|
committer | 2018-06-25 12:09:55 +0000 | |
commit | 752e08b1ae3eeae807a8262380dc02ba9af9c989 (patch) | |
tree | d3d528d1d823be721ca9fb4065666a76aa8e5e5f /src/gpu/gl/GrGLInterface.cpp | |
parent | 900b5364d12e6dc05c89892d72ed7de5488584b8 (diff) |
Fix abandonment of programs
Bug: skia:8092
TBR=bsalomon@google.com
Change-Id: If9cf4ed9f8ded4b7fbb58a244ec0b179b8430ca2
Reviewed-on: https://skia-review.googlesource.com/137121
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLInterface.cpp')
-rw-r--r-- | src/gpu/gl/GrGLInterface.cpp | 223 |
1 files changed, 223 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index 10b7b16dd9..b0b66c0f81 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -648,3 +648,226 @@ bool GrGLInterface::validate() const { return true; } + +#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(); +} + +#endif // GR_TEST_UTILS + |