Index: src/gpu/gl/GrGLXferProcessor.cpp |
diff --git a/src/gpu/gl/GrGLXferProcessor.cpp b/src/gpu/gl/GrGLXferProcessor.cpp |
index b707a3f632047d4892518d42f55f1b2454bcc83f..657da41274af0d8f3a7e19c559340d79d7afa668 100644 |
--- a/src/gpu/gl/GrGLXferProcessor.cpp |
+++ b/src/gpu/gl/GrGLXferProcessor.cpp |
@@ -12,8 +12,8 @@ |
#include "gl/builders/GrGLProgramBuilder.h" |
void GrGLXferProcessor::emitCode(const EmitArgs& args) { |
- if (args.fXP.getDstTexture()) { |
- bool topDown = kTopLeft_GrSurfaceOrigin == args.fXP.getDstTexture()->origin(); |
+ if (args.fXP.getDstCopyTexture()) { |
+ bool topDown = kTopLeft_GrSurfaceOrigin == args.fXP.getDstCopyTexture()->origin(); |
GrGLXPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
@@ -27,24 +27,24 @@ |
const char* dstColor = fsBuilder->dstColor(); |
- const char* dstTopLeftName; |
- const char* dstCoordScaleName; |
+ const char* dstCopyTopLeftName; |
+ const char* dstCopyCoordScaleName; |
- fDstTopLeftUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
- kVec2f_GrSLType, |
- kDefault_GrSLPrecision, |
- "DstTextureUpperLeft", |
- &dstTopLeftName); |
- fDstScaleUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
- kVec2f_GrSLType, |
- kDefault_GrSLPrecision, |
- "DstTextureCoordScale", |
- &dstCoordScaleName); |
+ fDstCopyTopLeftUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
+ kVec2f_GrSLType, |
+ kDefault_GrSLPrecision, |
+ "DstCopyUpperLeft", |
+ &dstCopyTopLeftName); |
+ fDstCopyScaleUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
+ kVec2f_GrSLType, |
+ kDefault_GrSLPrecision, |
+ "DstCopyCoordScale", |
+ &dstCopyCoordScaleName); |
const char* fragPos = fsBuilder->fragmentPosition(); |
fsBuilder->codeAppend("// Read color from copy of the destination.\n"); |
fsBuilder->codeAppendf("vec2 _dstTexCoord = (%s.xy - %s) * %s;", |
- fragPos, dstTopLeftName, dstCoordScaleName); |
+ fragPos, dstCopyTopLeftName, dstCopyCoordScaleName); |
if (!topDown) { |
fsBuilder->codeAppend("_dstTexCoord.y = 1.0 - _dstTexCoord.y;"); |
@@ -59,18 +59,18 @@ |
} |
void GrGLXferProcessor::setData(const GrGLProgramDataManager& pdm, const GrXferProcessor& xp) { |
- if (xp.getDstTexture()) { |
- if (fDstTopLeftUni.isValid()) { |
- pdm.set2f(fDstTopLeftUni, static_cast<GrGLfloat>(xp.dstTextureOffset().fX), |
- static_cast<GrGLfloat>(xp.dstTextureOffset().fY)); |
- pdm.set2f(fDstScaleUni, 1.f / xp.getDstTexture()->width(), |
- 1.f / xp.getDstTexture()->height()); |
+ if (xp.getDstCopyTexture()) { |
+ if (fDstCopyTopLeftUni.isValid()) { |
+ pdm.set2f(fDstCopyTopLeftUni, static_cast<GrGLfloat>(xp.dstCopyTextureOffset().fX), |
+ static_cast<GrGLfloat>(xp.dstCopyTextureOffset().fY)); |
+ pdm.set2f(fDstCopyScaleUni, 1.f / xp.getDstCopyTexture()->width(), |
+ 1.f / xp.getDstCopyTexture()->height()); |
} else { |
- SkASSERT(!fDstScaleUni.isValid()); |
+ SkASSERT(!fDstCopyScaleUni.isValid()); |
} |
} else { |
- SkASSERT(!fDstTopLeftUni.isValid()); |
- SkASSERT(!fDstScaleUni.isValid()); |
+ SkASSERT(!fDstCopyTopLeftUni.isValid()); |
+ SkASSERT(!fDstCopyScaleUni.isValid()); |
} |
this->onSetData(pdm, xp); |
} |