Lines Matching refs:fragBuilder
20 static void adjust_for_lcd_coverage(GrGLSLXPFragmentBuilder* fragBuilder, in adjust_for_lcd_coverage() argument
24 fragBuilder->codeAppendf("%s.a = max(max(%s.r, %s.g), %s.b);", in adjust_for_lcd_coverage()
37 GrGLSLXPFragmentBuilder* fragBuilder = args.fXPFragBuilder; in emitCode() local
39 const char* dstColor = fragBuilder->dstColor(); in emitCode()
55 fragBuilder->codeAppendf("if (all(lessThanEqual(%s.rgb, half3(0)))) {" in emitCode()
72 fragBuilder->codeAppend("// Read color from copy of the destination.\n"); in emitCode()
73 fragBuilder->codeAppendf("half2 _dstTexCoord = (sk_FragCoord.xy - %s) * %s;", in emitCode()
77 fragBuilder->codeAppend("_dstTexCoord.y = 1.0 - _dstTexCoord.y;"); in emitCode()
80 fragBuilder->codeAppendf("half4 %s = ", dstColor); in emitCode()
81 fragBuilder->appendTextureLookup(args.fDstTextureSamplerHandle, "_dstTexCoord", in emitCode()
83 fragBuilder->codeAppend(";"); in emitCode()
92 fragBuilder->codeAppendf("half4 %s;", outColor); in emitCode()
95 this->emitBlendCodeForDstRead(fragBuilder, in emitCode()
104 fragBuilder->codeAppendf("%s = %s;", args.fOutputPrimary, outColor); in emitCode()
125 void GrGLSLXferProcessor::DefaultCoverageModulation(GrGLSLXPFragmentBuilder* fragBuilder, in DefaultCoverageModulation() argument
137 fragBuilder->codeAppendf("%s *= %s;", outColor, srcCoverage); in DefaultCoverageModulation()
138 fragBuilder->codeAppendf("%s = %s;", outColorSecondary, srcCoverage); in DefaultCoverageModulation()
140 fragBuilder->codeAppendf("%s = half4(1.0);", outColorSecondary); in DefaultCoverageModulation()
144 fragBuilder->codeAppendf("half lerpRed = mix(%s.a, %s.a, %s.r);", in DefaultCoverageModulation()
146 fragBuilder->codeAppendf("half lerpBlue = mix(%s.a, %s.a, %s.g);", in DefaultCoverageModulation()
148 fragBuilder->codeAppendf("half lerpGreen = mix(%s.a, %s.a, %s.b);", in DefaultCoverageModulation()
151 fragBuilder->codeAppendf("%s = %s * %s + (half4(1.0) - %s) * %s;", in DefaultCoverageModulation()
154 fragBuilder->codeAppendf("%s.a = max(max(lerpRed, lerpBlue), lerpGreen);", outColor); in DefaultCoverageModulation()