diff options
author | 2017-02-22 12:00:42 -0700 | |
---|---|---|
committer | 2017-02-22 20:29:56 +0000 | |
commit | 008b9d80ab9adbf2656eceaf54d11cd15e4dda05 (patch) | |
tree | 06d4863dc3f65dcdb6704ec65f31800e544ea181 /src/gpu/gl | |
parent | 19eec39c90a357ff3476d65f2c672096f55518e3 (diff) |
Add the ability to enable/disable GPU path renderers
Adds a bitfield to GrContextOptions that masks out path renderers.
Adds commandline flags support to set this bitfield in tools apps.
Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same
thing in the context options.
BUG=skia:
Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f
Reviewed-on: https://skia-review.googlesource.com/8786
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGLInterface.cpp | 31 |
2 files changed, 3 insertions, 32 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 4c252215a9..370fb0713b 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -258,7 +258,9 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, this->initGLSL(ctxInfo); GrShaderCaps* shaderCaps = fShaderCaps.get(); - shaderCaps->fPathRenderingSupport = this->hasPathRenderingSupport(ctxInfo, gli); + if (!contextOptions.fSuppressPathRendering) { + shaderCaps->fPathRenderingSupport = this->hasPathRenderingSupport(ctxInfo, gli); + } // For now these two are equivalent but we could have dst read in shader via some other method. // Before setting this, initGLSL() must have been called. diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp index 45d84add8d..3714dcb86e 100644 --- a/src/gpu/gl/GrGLInterface.cpp +++ b/src/gpu/gl/GrGLInterface.cpp @@ -29,37 +29,6 @@ const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface* interf return newInterface; } -const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) { - GrGLInterface* newInterface = GrGLInterface::NewClone(interface); - - newInterface->fExtensions.remove("GL_NV_path_rendering"); - newInterface->fExtensions.remove("GL_CHROMIUM_path_rendering"); - newInterface->fFunctions.fMatrixLoadf = nullptr; - newInterface->fFunctions.fMatrixLoadIdentity = nullptr; - newInterface->fFunctions.fPathCommands = nullptr; - newInterface->fFunctions.fPathParameteri = nullptr; - newInterface->fFunctions.fPathParameterf = nullptr; - newInterface->fFunctions.fGenPaths = nullptr; - newInterface->fFunctions.fDeletePaths = nullptr; - newInterface->fFunctions.fIsPath = nullptr; - newInterface->fFunctions.fPathStencilFunc = nullptr; - newInterface->fFunctions.fStencilFillPath = nullptr; - newInterface->fFunctions.fStencilStrokePath = nullptr; - newInterface->fFunctions.fStencilFillPathInstanced = nullptr; - newInterface->fFunctions.fStencilStrokePathInstanced = nullptr; - newInterface->fFunctions.fCoverFillPath = nullptr; - newInterface->fFunctions.fCoverStrokePath = nullptr; - newInterface->fFunctions.fCoverFillPathInstanced = nullptr; - newInterface->fFunctions.fCoverStrokePathInstanced = nullptr; - newInterface->fFunctions.fStencilThenCoverFillPath = nullptr; - newInterface->fFunctions.fStencilThenCoverStrokePath = nullptr; - newInterface->fFunctions.fStencilThenCoverFillPathInstanced = nullptr; - newInterface->fFunctions.fStencilThenCoverStrokePathInstanced = nullptr; - newInterface->fFunctions.fProgramPathFragmentInputGen = nullptr; - newInterface->fFunctions.fBindFragmentInputLocation = nullptr; - return newInterface; -} - GrGLInterface::GrGLInterface() { fStandard = kNone_GrGLStandard; } |