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:
John Stiles 2021-05-11 17:32:04 -04:00 committed by Skia Commit-Bot
parent bb3966ad4e
commit cc29ca5196
2 changed files with 5 additions and 16 deletions

View File

@ -114,15 +114,11 @@ SkString GrGLSLFragmentProcessor::invokeChildWithMatrix(int childIndex, const ch
if (childProc->sampleUsage().fHasPerspective) {
return SkStringPrintf("%s(%s, proj((%s) * %s.xy1))", fFunctionNames[childIndex].c_str(),
inputColor, matrixExpr.c_str(), args.fSampleCoord);
}
#ifndef SK_DISABLE_NONSQUARE_MATRIX_TRANSFORM
else if (args.fShaderCaps->nonsquareMatrixSupport()) {
} else if (args.fShaderCaps->nonsquareMatrixSupport()) {
return SkStringPrintf("%s(%s, float3x2(%s) * %s.xy1)",
fFunctionNames[childIndex].c_str(), inputColor,
matrixExpr.c_str(), args.fSampleCoord);
}
#endif
else {
} else {
return SkStringPrintf("%s(%s, ((%s) * %s.xy1).xy)", fFunctionNames[childIndex].c_str(),
inputColor, matrixExpr.c_str(), args.fSampleCoord);
}

View File

@ -226,14 +226,11 @@ void GrGLSLGeometryProcessor::emitTransformCode(GrGLSLVertexBuilder* vb,
vb->codeAppend("{\n");
if (tr.fOutputCoords.getType() == kFloat2_GrSLType) {
#ifndef SK_DISABLE_NONSQUARE_MATRIX_TRANSFORM
if (vb->getProgramBuilder()->shaderCaps()->nonsquareMatrixSupport()) {
vb->codeAppendf("%s = float3x2(%s) * %s", tr.fOutputCoords.getName().c_str(),
transformExpression.c_str(),
localCoords.c_str());
} else
#endif
{
} else {
vb->codeAppendf("%s = ((%s) * %s).xy", tr.fOutputCoords.getName().c_str(),
transformExpression.c_str(),
localCoords.c_str());
@ -362,16 +359,12 @@ static void write_vertex_position(GrGLSLVertexBuilder* vertBuilder,
mangledMatrixName,
inPos.getName().c_str(),
mangledMatrixName);
}
#ifndef SK_DISABLE_NONSQUARE_MATRIX_TRANSFORM
else if (shaderCaps.nonsquareMatrixSupport()) {
} else if (shaderCaps.nonsquareMatrixSupport()) {
vertBuilder->codeAppendf("float2 %s = float3x2(%s) * %s.xy1;\n",
outName.c_str(),
mangledMatrixName,
inPos.getName().c_str());
}
#endif
else {
} else {
vertBuilder->codeAppendf("float2 %s = (%s * %s.xy1).xy;\n",
outName.c_str(),
mangledMatrixName,