From 03f9e2a3b7d4b3751977039480fbd3d283d8bd1f Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Tue, 8 Dec 2020 11:17:26 -0500 Subject: [PATCH] Remove fInputColor usage in unit-test FPs Change-Id: If467390cd3e1d33f0e72db4b75f9889d4562af5a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341722 Commit-Queue: Brian Osman Reviewed-by: Brian Salomon --- tests/ProcessorTest.cpp | 3 +-- tests/ProgramsTest.cpp | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp index 473f11cafc..92b632adc3 100644 --- a/tests/ProcessorTest.cpp +++ b/tests/ProcessorTest.cpp @@ -129,8 +129,7 @@ private: public: TestGLSLFP() {} void emitCode(EmitArgs& args) override { - GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; - fragBuilder->codeAppendf("%s = %s;", args.fOutputColor, args.fInputColor); + args.fFragBuilder->codeAppendf("%s = half4(1);", args.fOutputColor); } private: diff --git a/tests/ProgramsTest.cpp b/tests/ProgramsTest.cpp index a024a7acd7..633be6c501 100644 --- a/tests/ProgramsTest.cpp +++ b/tests/ProgramsTest.cpp @@ -42,13 +42,7 @@ static const uint32_t kMaxKeySize = 1024; class GLBigKeyProcessor : public GrGLSLFragmentProcessor { public: void emitCode(EmitArgs& args) override { - // pass through - GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; - if (args.fInputColor) { - fragBuilder->codeAppendf("%s = %s;\n", args.fOutputColor, args.fInputColor); - } else { - fragBuilder->codeAppendf("%s = vec4(1.0);\n", args.fOutputColor); - } + args.fFragBuilder->codeAppendf("%s = half4(1);\n", args.fOutputColor); } static void GenKey(const GrProcessor&, const GrShaderCaps&, GrProcessorKeyBuilder* b) {