diff options
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLProgram.cpp | 5 | ||||
-rw-r--r-- | src/gpu/gl/GrGLProgram.h | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGLProgramDesc.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLProgramDesc.h | 1 | ||||
-rw-r--r-- | src/gpu/gl/GrGpuGL.h | 5 | ||||
-rw-r--r-- | src/gpu/gl/GrGpuGL_program.cpp | 9 |
6 files changed, 8 insertions, 18 deletions
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp index 0e67e81e86..3249793d62 100644 --- a/src/gpu/gl/GrGLProgram.cpp +++ b/src/gpu/gl/GrGLProgram.cpp @@ -126,9 +126,7 @@ void GrGLProgram::bindTextures(const GrGLInstalledProc* ip, const GrProcessor& p /////////////////////////////////////////////////////////////////////////////// -void GrGLProgram::setData(const GrOptDrawState& optState, - GrGpu::DrawType drawType, - const GrDeviceCoordTexture* dstCopy) { +void GrGLProgram::setData(const GrOptDrawState& optState, GrGpu::DrawType drawType) { GrColor color = optState.getColor(); uint8_t coverage = optState.getCoverage(); @@ -136,6 +134,7 @@ void GrGLProgram::setData(const GrOptDrawState& optState, this->setCoverage(optState, coverage); this->setMatrixAndRenderTargetHeight(drawType, optState); + const GrDeviceCoordTexture* dstCopy = optState.getDstCopy(); if (dstCopy) { if (fBuiltinUniformHandles.fDstCopyTopLeftUni.isValid()) { fProgramDataManager.set2f(fBuiltinUniformHandles.fDstCopyTopLeftUni, diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h index c623977a91..a273a0381e 100644 --- a/src/gpu/gl/GrGLProgram.h +++ b/src/gpu/gl/GrGLProgram.h @@ -129,9 +129,7 @@ public: * GrGpuGL object to bind the textures required by the GrGLProcessors. The color and coverage * stages come from GrGLProgramDesc::Build(). */ - void setData(const GrOptDrawState&, - GrGpu::DrawType, - const GrDeviceCoordTexture* dstCopy /* can be NULL*/); + void setData(const GrOptDrawState&, GrGpu::DrawType); protected: typedef GrGLProgramDataManager::UniformHandle UniformHandle; diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp index f8510ff30b..954a482f3a 100644 --- a/src/gpu/gl/GrGLProgramDesc.cpp +++ b/src/gpu/gl/GrGLProgramDesc.cpp @@ -204,7 +204,6 @@ bool GrGLProgramDescBuilder::Build(const GrOptDrawState& optState, const GrProgramDesc::DescInfo& descInfo, GrGpu::DrawType drawType, GrGpuGL* gpu, - const GrDeviceCoordTexture* dstCopy, GrProgramDesc* desc) { bool inputColorIsUsed = descInfo.fInputColorIsUsed; bool inputCoverageIsUsed = descInfo.fInputCoverageIsUsed; @@ -294,6 +293,7 @@ bool GrGLProgramDescBuilder::Build(const GrOptDrawState& optState, } if (descInfo.fReadsDst) { + const GrDeviceCoordTexture* dstCopy = optState.getDstCopy(); SkASSERT(dstCopy || gpu->caps()->dstReadInShaderSupport()); const GrTexture* dstCopyTexture = NULL; if (dstCopy) { diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h index 8bfd506135..8b032e099c 100644 --- a/src/gpu/gl/GrGLProgramDesc.h +++ b/src/gpu/gl/GrGLProgramDesc.h @@ -62,7 +62,6 @@ public: const GrProgramDesc::DescInfo&, GrGpu::DrawType, GrGpuGL*, - const GrDeviceCoordTexture*, GrProgramDesc*); static const GLKeyHeader& GetHeader(const GrProgramDesc& desc) { diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h index 8212f9e617..a176c95bca 100644 --- a/src/gpu/gl/GrGpuGL.h +++ b/src/gpu/gl/GrGpuGL.h @@ -109,7 +109,6 @@ protected: virtual void buildProgramDesc(const GrOptDrawState&, const GrProgramDesc::DescInfo&, GrGpu::DrawType, - const GrDeviceCoordTexture* dstCopy, GrProgramDesc*) SK_OVERRIDE; private: @@ -157,9 +156,7 @@ private: virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE; - virtual bool flushGraphicsState(const GrOptDrawState&, - DrawType, - const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE; + virtual bool flushGraphicsState(const GrOptDrawState&, DrawType) SK_OVERRIDE; // GrDrawTarget overrides virtual void didAddGpuTraceMarker() SK_OVERRIDE; diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp index 864b453691..176b7cd8d4 100644 --- a/src/gpu/gl/GrGpuGL_program.cpp +++ b/src/gpu/gl/GrGpuGL_program.cpp @@ -201,9 +201,7 @@ GrGLProgram* GrGpuGL::ProgramCache::getProgram(const GrOptDrawState& optState, D #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) -bool GrGpuGL::flushGraphicsState(const GrOptDrawState& optState, - DrawType type, - const GrDeviceCoordTexture* dstCopy) { +bool GrGpuGL::flushGraphicsState(const GrOptDrawState& optState, DrawType type) { // GrGpu::setupClipAndFlushState should have already checked this and bailed if not true. SkASSERT(optState.getRenderTarget()); @@ -240,7 +238,7 @@ bool GrGpuGL::flushGraphicsState(const GrOptDrawState& optState, this->flushBlend(optState, kDrawLines_DrawType == type, srcCoeff, dstCoeff); - fCurrentProgram->setData(optState, type, dstCopy); + fCurrentProgram->setData(optState, type); } GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState.getRenderTarget()); @@ -309,9 +307,8 @@ void GrGpuGL::setupGeometry(const GrOptDrawState& optState, void GrGpuGL::buildProgramDesc(const GrOptDrawState& optState, const GrProgramDesc::DescInfo& descInfo, GrGpu::DrawType drawType, - const GrDeviceCoordTexture* dstCopy, GrProgramDesc* desc) { - if (!GrGLProgramDescBuilder::Build(optState, descInfo, drawType, this, dstCopy, desc)) { + if (!GrGLProgramDescBuilder::Build(optState, descInfo, drawType, this, desc)) { SkDEBUGFAIL("Failed to generate GL program descriptor"); } } |