aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLFragmentProcessor.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-05-08 09:36:08 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-08 16:08:44 +0000
commit2983f4022d756def4f93579ee519cd31c8f24d61 (patch)
tree60b9bc416882a8b2b2d5826d5e6ad8c59e8c7901 /src/gpu/glsl/GrGLSLFragmentProcessor.h
parent0562eb9c6c98f07732ca96a1dd4e986f1ca089b8 (diff)
Re-land of "eliminated GrGLSLExpr".
This change is exactly the same as the last time it was landed; I believe the underlying optimizer bug that was causing this to cause problems has been fixed by a prior CL. Bug: skia: Change-Id: I5436422f094ea758caa3cd69e9338db31b1f93fa Reviewed-on: https://skia-review.googlesource.com/15768 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/glsl/GrGLSLFragmentProcessor.h')
-rw-r--r--src/gpu/glsl/GrGLSLFragmentProcessor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.h b/src/gpu/glsl/GrGLSLFragmentProcessor.h
index 0d53196da8..fe7775a9c4 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.h
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.h
@@ -157,6 +157,10 @@ public:
return fChildProcessors[index];
}
+ inline void emitChild(int childIndex, SkString* outputColor, EmitArgs& parentArgs) {
+ this->emitChild(childIndex, "vec4(1.0)", outputColor, parentArgs);
+ }
+
/** Will emit the code of a child proc in its own scope. Pass in the parent's EmitArgs and
* emitChild will automatically extract the coords and samplers of that child and pass them
* on to the child's emitCode(). Also, any uniforms or functions emitted by the child will
@@ -168,6 +172,10 @@ public:
void emitChild(int childIndex, const char* inputColor, SkString* outputColor,
EmitArgs& parentArgs);
+ inline void emitChild(int childIndex, EmitArgs& args) {
+ this->emitChild(childIndex, "vec4(1.0)", args);
+ }
+
/** Variation that uses the parent's output color variable to hold the child's output.*/
void emitChild(int childIndex, const char* inputColor, EmitArgs& parentArgs);