2017-06-29 14:03:38 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2017 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "SkSLCompiler.h"
|
|
|
|
|
|
|
|
#include "Test.h"
|
|
|
|
|
|
|
|
#if SK_SUPPORT_GPU
|
|
|
|
|
|
|
|
static void test(skiatest::Reporter* r, const char* src, const GrShaderCaps& caps,
|
|
|
|
std::vector<const char*> expectedH, std::vector<const char*> expectedCPP) {
|
|
|
|
SkSL::Program::Settings settings;
|
|
|
|
settings.fCaps = ∩︀
|
|
|
|
SkSL::Compiler compiler;
|
|
|
|
SkSL::StringStream output;
|
|
|
|
std::unique_ptr<SkSL::Program> program = compiler.convertProgram(
|
|
|
|
SkSL::Program::kFragmentProcessor_Kind,
|
2017-08-14 18:48:10 +00:00
|
|
|
SkSL::String(src),
|
2017-06-29 14:03:38 +00:00
|
|
|
settings);
|
|
|
|
if (!program) {
|
|
|
|
SkDebugf("Unexpected error compiling %s\n%s", src, compiler.errorText().c_str());
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
REPORTER_ASSERT(r, program);
|
|
|
|
bool success = compiler.toH(*program, "Test", output);
|
|
|
|
if (!success) {
|
|
|
|
SkDebugf("Unexpected error compiling %s\n%s", src, compiler.errorText().c_str());
|
|
|
|
}
|
|
|
|
REPORTER_ASSERT(r, success);
|
|
|
|
if (success) {
|
|
|
|
for (const char* expected : expectedH) {
|
|
|
|
bool found = strstr(output.str().c_str(), expected);
|
|
|
|
if (!found) {
|
|
|
|
SkDebugf("HEADER MISMATCH:\nsource:\n%s\n\nexpected:\n'%s'\n\nreceived:\n'%s'", src,
|
|
|
|
expected, output.str().c_str());
|
|
|
|
}
|
|
|
|
REPORTER_ASSERT(r, found);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
output.reset();
|
|
|
|
success = compiler.toCPP(*program, "Test", output);
|
|
|
|
if (!success) {
|
|
|
|
SkDebugf("Unexpected error compiling %s\n%s", src, compiler.errorText().c_str());
|
|
|
|
}
|
|
|
|
REPORTER_ASSERT(r, success);
|
|
|
|
if (success) {
|
|
|
|
for (const char* expected : expectedCPP) {
|
|
|
|
bool found = strstr(output.str().c_str(), expected);
|
|
|
|
if (!found) {
|
|
|
|
SkDebugf("CPP MISMATCH:\nsource:\n%s\n\nexpected:\n'%s'\n\nreceived:\n'%s'", src,
|
|
|
|
expected, output.str().c_str());
|
|
|
|
}
|
|
|
|
REPORTER_ASSERT(r, found);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DEF_TEST(SkSLFPHelloWorld, r) {
|
|
|
|
test(r,
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
|
|
|
"/*\n"
|
|
|
|
" * Copyright 2017 Google Inc.\n"
|
|
|
|
" *\n"
|
|
|
|
" * Use of this source code is governed by a BSD-style license that can be\n"
|
|
|
|
" * found in the LICENSE file.\n"
|
|
|
|
" */\n"
|
|
|
|
"\n"
|
|
|
|
"/*\n"
|
|
|
|
" * This file was autogenerated from GrTest.fp; do not modify.\n"
|
|
|
|
" */\n"
|
|
|
|
"#ifndef GrTest_DEFINED\n"
|
|
|
|
"#define GrTest_DEFINED\n"
|
2017-07-10 19:40:20 +00:00
|
|
|
"#include \"SkTypes.h\"\n"
|
|
|
|
"#if SK_SUPPORT_GPU\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
"#include \"GrFragmentProcessor.h\"\n"
|
|
|
|
"#include \"GrCoordTransform.h\"\n"
|
|
|
|
"class GrTest : public GrFragmentProcessor {\n"
|
|
|
|
"public:\n"
|
2017-08-11 13:40:37 +00:00
|
|
|
" static std::unique_ptr<GrFragmentProcessor> Make() {\n"
|
|
|
|
" return std::unique_ptr<GrFragmentProcessor>(new GrTest());\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
" }\n"
|
2017-07-31 15:18:22 +00:00
|
|
|
" GrTest(const GrTest& src);\n"
|
2017-08-11 13:40:37 +00:00
|
|
|
" std::unique_ptr<GrFragmentProcessor> clone() const override;\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
" const char* name() const override { return \"Test\"; }\n"
|
|
|
|
"private:\n"
|
|
|
|
" GrTest()\n"
|
2017-10-09 14:54:08 +00:00
|
|
|
" : INHERITED(kGrTest_ClassID, kNone_OptimizationFlags) {\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
" }\n"
|
|
|
|
" GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;\n"
|
|
|
|
" void onGetGLSLProcessorKey(const GrShaderCaps&,GrProcessorKeyBuilder*) "
|
|
|
|
"const override;\n"
|
|
|
|
" bool onIsEqual(const GrFragmentProcessor&) const override;\n"
|
2017-07-06 14:09:38 +00:00
|
|
|
" GR_DECLARE_FRAGMENT_PROCESSOR_TEST\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
" typedef GrFragmentProcessor INHERITED;\n"
|
|
|
|
"};\n"
|
|
|
|
"#endif\n"
|
2017-07-10 19:40:20 +00:00
|
|
|
"#endif\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"/*\n"
|
|
|
|
" * Copyright 2017 Google Inc.\n"
|
|
|
|
" *\n"
|
|
|
|
" * Use of this source code is governed by a BSD-style license that can be\n"
|
|
|
|
" * found in the LICENSE file.\n"
|
|
|
|
" */\n"
|
|
|
|
"\n"
|
|
|
|
"/*\n"
|
|
|
|
" * This file was autogenerated from GrTest.fp; do not modify.\n"
|
|
|
|
" */\n"
|
|
|
|
"#include \"GrTest.h\"\n"
|
2017-07-10 19:40:20 +00:00
|
|
|
"#if SK_SUPPORT_GPU\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
"#include \"glsl/GrGLSLFragmentProcessor.h\"\n"
|
|
|
|
"#include \"glsl/GrGLSLFragmentShaderBuilder.h\"\n"
|
|
|
|
"#include \"glsl/GrGLSLProgramBuilder.h\"\n"
|
|
|
|
"#include \"SkSLCPP.h\"\n"
|
|
|
|
"#include \"SkSLUtil.h\"\n"
|
|
|
|
"class GrGLSLTest : public GrGLSLFragmentProcessor {\n"
|
|
|
|
"public:\n"
|
|
|
|
" GrGLSLTest() {}\n"
|
|
|
|
" void emitCode(EmitArgs& args) override {\n"
|
|
|
|
" GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;\n"
|
|
|
|
" const GrTest& _outer = args.fFp.cast<GrTest>();\n"
|
|
|
|
" (void) _outer;\n"
|
2017-09-18 18:10:39 +00:00
|
|
|
" fragBuilder->codeAppendf(\"%s = half4(1.0);\\n\", args.fOutputColor);\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
" }\n"
|
|
|
|
"private:\n"
|
|
|
|
" void onSetData(const GrGLSLProgramDataManager& pdman, "
|
|
|
|
"const GrFragmentProcessor& _proc) override {\n"
|
|
|
|
" }\n"
|
|
|
|
"};\n"
|
|
|
|
"GrGLSLFragmentProcessor* GrTest::onCreateGLSLInstance() const {\n"
|
|
|
|
" return new GrGLSLTest();\n"
|
|
|
|
"}\n"
|
|
|
|
"void GrTest::onGetGLSLProcessorKey(const GrShaderCaps& caps, "
|
|
|
|
"GrProcessorKeyBuilder* b) const {\n"
|
|
|
|
"}\n"
|
|
|
|
"bool GrTest::onIsEqual(const GrFragmentProcessor& other) const {\n"
|
|
|
|
" const GrTest& that = other.cast<GrTest>();\n"
|
|
|
|
" (void) that;\n"
|
|
|
|
" return true;\n"
|
|
|
|
"}\n"
|
2017-07-31 15:18:22 +00:00
|
|
|
"GrTest::GrTest(const GrTest& src)\n"
|
2017-10-09 14:54:08 +00:00
|
|
|
": INHERITED(kGrTest_ClassID, src.optimizationFlags()) {\n"
|
2017-07-31 15:18:22 +00:00
|
|
|
"}\n"
|
2017-08-11 13:40:37 +00:00
|
|
|
"std::unique_ptr<GrFragmentProcessor> GrTest::clone() const {\n"
|
|
|
|
" return std::unique_ptr<GrFragmentProcessor>(new GrTest(*this));\n"
|
2017-07-31 15:18:22 +00:00
|
|
|
"}\n"
|
2017-07-10 19:40:20 +00:00
|
|
|
"#endif\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
DEF_TEST(SkSLFPInput, r) {
|
|
|
|
test(r,
|
2017-09-18 18:10:39 +00:00
|
|
|
"in half2 point;"
|
2017-06-29 14:03:38 +00:00
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(point, point);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
|
|
|
"SkPoint point() const { return fPoint; }",
|
2017-08-11 13:40:37 +00:00
|
|
|
"static std::unique_ptr<GrFragmentProcessor> Make(SkPoint point) {",
|
|
|
|
"return std::unique_ptr<GrFragmentProcessor>(new GrTest(point));",
|
2017-06-29 14:03:38 +00:00
|
|
|
"GrTest(SkPoint point)",
|
|
|
|
", fPoint(point)"
|
|
|
|
},
|
|
|
|
{
|
2017-09-18 18:10:39 +00:00
|
|
|
"fragBuilder->codeAppendf(\"%s = half4(half2(%f, %f), half2(%f, %f));\\n\", "
|
2017-06-29 14:03:38 +00:00
|
|
|
"args.fOutputColor, _outer.point().fX, _outer.point().fY, "
|
|
|
|
"_outer.point().fX, _outer.point().fY);",
|
|
|
|
"if (fPoint != that.fPoint) return false;"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
DEF_TEST(SkSLFPUniform, r) {
|
|
|
|
test(r,
|
2017-09-18 18:10:39 +00:00
|
|
|
"uniform half4 color;"
|
2017-06-29 14:03:38 +00:00
|
|
|
"void main() {"
|
|
|
|
"sk_OutColor = color;"
|
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
2017-08-11 13:40:37 +00:00
|
|
|
"static std::unique_ptr<GrFragmentProcessor> Make()"
|
2017-06-29 14:03:38 +00:00
|
|
|
},
|
|
|
|
{
|
2017-09-18 18:10:39 +00:00
|
|
|
"fColorVar = args.fUniformHandler->addUniform(kFragment_GrShaderFlag, kHalf4_GrSLType, "
|
2017-06-29 14:03:38 +00:00
|
|
|
"kDefault_GrSLPrecision, \"color\");",
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
DEF_TEST(SkSLFPInUniform, r) {
|
|
|
|
test(r,
|
2017-09-18 18:10:39 +00:00
|
|
|
"in uniform half4 color;"
|
2017-06-29 14:03:38 +00:00
|
|
|
"void main() {"
|
|
|
|
"sk_OutColor = color;"
|
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
2017-08-11 13:40:37 +00:00
|
|
|
"static std::unique_ptr<GrFragmentProcessor> Make(SkRect color) {",
|
2017-06-29 14:03:38 +00:00
|
|
|
},
|
|
|
|
{
|
2017-09-18 18:10:39 +00:00
|
|
|
"fColorVar = args.fUniformHandler->addUniform(kFragment_GrShaderFlag, kHalf4_GrSLType, "
|
2017-06-29 14:03:38 +00:00
|
|
|
"kDefault_GrSLPrecision, \"color\");",
|
|
|
|
"const SkRect colorValue = _outer.color();",
|
2017-07-17 19:13:45 +00:00
|
|
|
"pdman.set4fv(fColorVar, 1, (float*) &colorValue);"
|
2017-06-29 14:03:38 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
DEF_TEST(SkSLFPSections, r) {
|
|
|
|
test(r,
|
|
|
|
"@header { header section }"
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
2017-07-10 19:40:20 +00:00
|
|
|
"#if SK_SUPPORT_GPU\n header section"
|
2017-06-29 14:03:38 +00:00
|
|
|
},
|
|
|
|
{});
|
|
|
|
test(r,
|
|
|
|
"@class { class section }"
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
|
|
|
"class GrTest : public GrFragmentProcessor {\n"
|
|
|
|
"public:\n"
|
|
|
|
" class section"
|
|
|
|
},
|
|
|
|
{});
|
|
|
|
test(r,
|
|
|
|
"@cpp { cpp section }"
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{},
|
|
|
|
{"cpp section"});
|
|
|
|
test(r,
|
|
|
|
"@constructorParams { int x, float y, std::vector<float> z }"
|
2017-09-20 15:24:15 +00:00
|
|
|
"in float w;"
|
2017-06-29 14:03:38 +00:00
|
|
|
"void main() {"
|
2017-09-20 15:24:15 +00:00
|
|
|
"sk_OutColor = float4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
|
|
|
"Make(float w, int x, float y, std::vector<float> z )",
|
2017-08-11 13:40:37 +00:00
|
|
|
"return std::unique_ptr<GrFragmentProcessor>(new GrTest(w, x, y, z));",
|
2017-06-29 14:03:38 +00:00
|
|
|
"GrTest(float w, int x, float y, std::vector<float> z )",
|
|
|
|
", fW(w) {"
|
|
|
|
},
|
|
|
|
{});
|
|
|
|
test(r,
|
|
|
|
"@constructor { constructor section }"
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
|
|
|
"private:\n constructor section"
|
|
|
|
},
|
|
|
|
{});
|
|
|
|
test(r,
|
|
|
|
"@initializers { initializers section }"
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
2017-10-09 14:54:08 +00:00
|
|
|
": INHERITED(kGrTest_ClassID, kNone_OptimizationFlags)\n , initializers section"
|
2017-06-29 14:03:38 +00:00
|
|
|
},
|
|
|
|
{});
|
|
|
|
test(r,
|
2017-09-18 18:10:39 +00:00
|
|
|
"half x = 10;"
|
|
|
|
"@emitCode { fragBuilder->codeAppendf(\"half y = %d\\n\", x * 2); }"
|
2017-06-29 14:03:38 +00:00
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
"x = 10.0;\n"
|
2017-09-18 18:10:39 +00:00
|
|
|
" fragBuilder->codeAppendf(\"half y = %d\\n\", x * 2);"
|
2017-06-29 14:03:38 +00:00
|
|
|
});
|
|
|
|
test(r,
|
|
|
|
"@fields { fields section }"
|
2017-07-31 15:18:22 +00:00
|
|
|
"@clone { }"
|
2017-06-29 14:03:38 +00:00
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
2017-07-06 14:09:38 +00:00
|
|
|
"GR_DECLARE_FRAGMENT_PROCESSOR_TEST\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
" fields section typedef GrFragmentProcessor INHERITED;"
|
|
|
|
},
|
|
|
|
{});
|
|
|
|
test(r,
|
|
|
|
"@make { make section }"
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
|
|
|
"public:\n"
|
|
|
|
" make section"
|
|
|
|
},
|
|
|
|
{});
|
|
|
|
test(r,
|
2017-09-18 18:10:39 +00:00
|
|
|
"uniform half calculated;"
|
|
|
|
"in half provided;"
|
2017-06-29 14:03:38 +00:00
|
|
|
"@setData(varName) { varName.set1f(calculated, provided * 2); }"
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
"void onSetData(const GrGLSLProgramDataManager& varName, "
|
|
|
|
"const GrFragmentProcessor& _proc) override {\n",
|
|
|
|
"UniformHandle& calculated = fCalculatedVar;",
|
|
|
|
"auto provided = _outer.provided();",
|
|
|
|
"varName.set1f(calculated, provided * 2);"
|
|
|
|
});
|
|
|
|
test(r,
|
|
|
|
"@test(testDataName) { testDataName section }"
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(1);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
"#if GR_TEST_UTILS\n"
|
2017-08-11 13:40:37 +00:00
|
|
|
"std::unique_ptr<GrFragmentProcessor> GrTest::TestCreate(GrProcessorTestData* testDataName) {\n"
|
2017-06-29 14:03:38 +00:00
|
|
|
" testDataName section }\n"
|
|
|
|
"#endif"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
DEF_TEST(SkSLFPTransformedCoords, r) {
|
|
|
|
test(r,
|
|
|
|
"void main() {"
|
2017-09-18 18:10:39 +00:00
|
|
|
"sk_OutColor = half4(sk_TransformedCoords2D[0], sk_TransformedCoords2D[0]);"
|
2017-06-29 14:03:38 +00:00
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{},
|
|
|
|
{
|
2017-08-15 13:19:53 +00:00
|
|
|
"SkString sk_TransformedCoords2D_0 = "
|
2017-06-29 14:03:38 +00:00
|
|
|
"fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);",
|
2017-09-18 18:10:39 +00:00
|
|
|
"fragBuilder->codeAppendf(\"%s = half4(%s, %s);\\n\", args.fOutputColor, "
|
2017-06-29 14:03:38 +00:00
|
|
|
"sk_TransformedCoords2D_0.c_str(), sk_TransformedCoords2D_0.c_str());"
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DEF_TEST(SkSLFPLayoutWhen, r) {
|
|
|
|
test(r,
|
2017-09-18 18:10:39 +00:00
|
|
|
"layout(when=someExpression(someOtherExpression())) uniform half sometimes;"
|
2017-06-29 14:03:38 +00:00
|
|
|
"void main() {"
|
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
"if (someExpression(someOtherExpression())) {\n"
|
|
|
|
" fSometimesVar = args.fUniformHandler->addUniform"
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-10-10 20:30:21 +00:00
|
|
|
DEF_TEST(SkSLFPChildProcessors, r) {
|
|
|
|
test(r,
|
|
|
|
"in fragmentProcessor child1;"
|
|
|
|
"in fragmentProcessor child2;"
|
|
|
|
"void main() {"
|
|
|
|
" sk_OutColor = process(child1) * process(child2);"
|
|
|
|
"}",
|
|
|
|
*SkSL::ShaderCapsFactory::Default(),
|
|
|
|
{
|
|
|
|
"this->registerChildProcessor(std::move(child1));",
|
|
|
|
"this->registerChildProcessor(std::move(child2));"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"SkString _child0(\"_child0\");",
|
|
|
|
"this->emitChild(0, &_child0, args);",
|
|
|
|
"SkString _child1(\"_child1\");",
|
|
|
|
"this->emitChild(1, &_child1, args);",
|
|
|
|
"this->registerChildProcessor(src.childProcessor(0).clone());",
|
|
|
|
"this->registerChildProcessor(src.childProcessor(1).clone());"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2017-06-29 14:03:38 +00:00
|
|
|
#endif
|