Remove SK_DISABLE_NONSQUARE_MATRIX_TRANSFORM guard flag.
Do not land until http://go/jrev/c/2889593 has been submitted into Chromium. Change-Id: I40f2543d89c6aa56c24c84f50ab6c89fcb40e465 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407156 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
This commit is contained in:
parent
bb3966ad4e
commit
cc29ca5196
@ -114,15 +114,11 @@ SkString GrGLSLFragmentProcessor::invokeChildWithMatrix(int childIndex, const ch
|
|||||||
if (childProc->sampleUsage().fHasPerspective) {
|
if (childProc->sampleUsage().fHasPerspective) {
|
||||||
return SkStringPrintf("%s(%s, proj((%s) * %s.xy1))", fFunctionNames[childIndex].c_str(),
|
return SkStringPrintf("%s(%s, proj((%s) * %s.xy1))", fFunctionNames[childIndex].c_str(),
|
||||||
inputColor, matrixExpr.c_str(), args.fSampleCoord);
|
inputColor, matrixExpr.c_str(), args.fSampleCoord);
|
||||||
}
|
} else if (args.fShaderCaps->nonsquareMatrixSupport()) {
|
||||||
#ifndef SK_DISABLE_NONSQUARE_MATRIX_TRANSFORM
|
|
||||||
else if (args.fShaderCaps->nonsquareMatrixSupport()) {
|
|
||||||
return SkStringPrintf("%s(%s, float3x2(%s) * %s.xy1)",
|
return SkStringPrintf("%s(%s, float3x2(%s) * %s.xy1)",
|
||||||
fFunctionNames[childIndex].c_str(), inputColor,
|
fFunctionNames[childIndex].c_str(), inputColor,
|
||||||
matrixExpr.c_str(), args.fSampleCoord);
|
matrixExpr.c_str(), args.fSampleCoord);
|
||||||
}
|
} else {
|
||||||
#endif
|
|
||||||
else {
|
|
||||||
return SkStringPrintf("%s(%s, ((%s) * %s.xy1).xy)", fFunctionNames[childIndex].c_str(),
|
return SkStringPrintf("%s(%s, ((%s) * %s.xy1).xy)", fFunctionNames[childIndex].c_str(),
|
||||||
inputColor, matrixExpr.c_str(), args.fSampleCoord);
|
inputColor, matrixExpr.c_str(), args.fSampleCoord);
|
||||||
}
|
}
|
||||||
|
@ -226,14 +226,11 @@ void GrGLSLGeometryProcessor::emitTransformCode(GrGLSLVertexBuilder* vb,
|
|||||||
|
|
||||||
vb->codeAppend("{\n");
|
vb->codeAppend("{\n");
|
||||||
if (tr.fOutputCoords.getType() == kFloat2_GrSLType) {
|
if (tr.fOutputCoords.getType() == kFloat2_GrSLType) {
|
||||||
#ifndef SK_DISABLE_NONSQUARE_MATRIX_TRANSFORM
|
|
||||||
if (vb->getProgramBuilder()->shaderCaps()->nonsquareMatrixSupport()) {
|
if (vb->getProgramBuilder()->shaderCaps()->nonsquareMatrixSupport()) {
|
||||||
vb->codeAppendf("%s = float3x2(%s) * %s", tr.fOutputCoords.getName().c_str(),
|
vb->codeAppendf("%s = float3x2(%s) * %s", tr.fOutputCoords.getName().c_str(),
|
||||||
transformExpression.c_str(),
|
transformExpression.c_str(),
|
||||||
localCoords.c_str());
|
localCoords.c_str());
|
||||||
} else
|
} else {
|
||||||
#endif
|
|
||||||
{
|
|
||||||
vb->codeAppendf("%s = ((%s) * %s).xy", tr.fOutputCoords.getName().c_str(),
|
vb->codeAppendf("%s = ((%s) * %s).xy", tr.fOutputCoords.getName().c_str(),
|
||||||
transformExpression.c_str(),
|
transformExpression.c_str(),
|
||||||
localCoords.c_str());
|
localCoords.c_str());
|
||||||
@ -362,16 +359,12 @@ static void write_vertex_position(GrGLSLVertexBuilder* vertBuilder,
|
|||||||
mangledMatrixName,
|
mangledMatrixName,
|
||||||
inPos.getName().c_str(),
|
inPos.getName().c_str(),
|
||||||
mangledMatrixName);
|
mangledMatrixName);
|
||||||
}
|
} else if (shaderCaps.nonsquareMatrixSupport()) {
|
||||||
#ifndef SK_DISABLE_NONSQUARE_MATRIX_TRANSFORM
|
|
||||||
else if (shaderCaps.nonsquareMatrixSupport()) {
|
|
||||||
vertBuilder->codeAppendf("float2 %s = float3x2(%s) * %s.xy1;\n",
|
vertBuilder->codeAppendf("float2 %s = float3x2(%s) * %s.xy1;\n",
|
||||||
outName.c_str(),
|
outName.c_str(),
|
||||||
mangledMatrixName,
|
mangledMatrixName,
|
||||||
inPos.getName().c_str());
|
inPos.getName().c_str());
|
||||||
}
|
} else {
|
||||||
#endif
|
|
||||||
else {
|
|
||||||
vertBuilder->codeAppendf("float2 %s = (%s * %s.xy1).xy;\n",
|
vertBuilder->codeAppendf("float2 %s = (%s * %s.xy1).xy;\n",
|
||||||
outName.c_str(),
|
outName.c_str(),
|
||||||
mangledMatrixName,
|
mangledMatrixName,
|
||||||
|
Loading…
Reference in New Issue
Block a user