Lines Matching refs:writef
29 void CPPCodeGenerator::writef(const char* s, va_list va) { in writef() function in SkSL::CPPCodeGenerator
44 void CPPCodeGenerator::writef(const char* s, ...) { in writef() function in SkSL::CPPCodeGenerator
47 this->writef(s, va); in writef()
300 this->writef("%s%s", prefix, s->fText.c_str()); in writeSection()
350 this->writef(" if (%s) {\n ", var.fModifiers.fLayout.fWhen.c_str()); in addUniform()
353 this->writef(" %sVar = args.fUniformHandler->addUniform(kFragment_GrShaderFlag, %s, " in addUniform()
367 this->writef("%s %s;\n", in writePrivateVars()
383 this->writef("%s = %s;\n", in writePrivateVarValues()
395 this->writef(" const %s& _outer = args.fFp.cast<%s>();\n" in writeEmitCode()
406 this->writef(" fColorSpaceHelper.emitCode(args.fUniformHandler, " in writeEmitCode()
417 this->writef("%s fragBuilder->codeAppendf(\"%s\"", fExtraEmitCodeCode.c_str(), in writeEmitCode()
420 this->writef(", %s", s.c_str()); in writeEmitCode()
431 this->writef(" void onSetData(const GrGLSLProgramDataManager& %s, " in writeSetData()
438 this->writef(" const %s& _outer = _proc.cast<%s>();\n", fullName, fullName); in writeSetData()
440 this->writef(" {\n"); in writeSetData()
444 this->writef(" const SkRect %sValue = _outer.%s();\n" in writeSetData()
448 this->writef(" float %sValue[16];\n" in writeSetData()
455 this->writef(" if (fColorSpaceHelper.isValid()) {\n" in writeSetData()
460 this->writef(" %s.set1f(%sVar, _outer.%s());\n", in writeSetData()
466 this->writef(" }\n"); in writeSetData()
476 this->writef(" UniformHandle& %s = %sVar;\n" in writeSetData()
482 this->writef(" const %s& _outer = _proc.cast<%s>();\n", fullName, in writeSetData()
486 this->writef(" auto %s = _outer.%s();\n" in writeSetData()
501 this->writef("GR_DEFINE_FRAGMENT_PROCESSOR_TEST(%s);\n" in writeTest()
514 this->writef("void %s::onGetGLSLProcessorKey(const GrShaderCaps& caps, " in writeGetKey()
520 this->writef(" b->add32(GrColorSpaceXform::XformKey(%s.get()));\n", in writeGetKey()
534 this->writef(" b->add32(%s.fX);\n", in writeGetKey()
536 this->writef(" b->add32(%s.fY);\n", in writeGetKey()
539 this->writef(" b->add32(%s.x());\n", in writeGetKey()
541 this->writef(" b->add32(%s.y());\n", in writeGetKey()
543 this->writef(" b->add32(%s.width());\n", in writeGetKey()
545 this->writef(" b->add32(%s.height());\n", in writeGetKey()
548 this->writef(" b->add32(%s);\n", in writeGetKey()
557 this->writef(" b->add32(%s.isIdentity() ? 1 : 0);\n", in writeGetKey()
583 this->writef(kFragmentProcessorHeader, fullName); in generateCode()
584 this->writef("#include \"%s.h\"\n" in generateCode()
587 this->writef("#include \"glsl/GrGLSLColorSpaceXformHelper.h\"\n" in generateCode()
604 this->writef(" UniformHandle %sVar;\n", HCodeGenerator::FieldName(name).c_str()); in generateCode()
610 this->writef(" UniformHandle %sVar;\n", HCodeGenerator::FieldName(name).c_str()); in generateCode()
616 this->writef("};\n" in generateCode()
622 this->writef("bool %s::onIsEqual(const GrFragmentProcessor& other) const {\n" in generateCode()
628 this->writef(" if (%s != that.%s) return false;\n", in generateCode()