ComposeShader GPU implementations
Bug: skia:
Change-Id: I007b46ead1900a8f5cce82dec33b6d662fc63d8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206918
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/effects/GrComposeLerpRedEffect.h b/src/gpu/effects/GrComposeLerpRedEffect.h
new file mode 100644
index 0000000..f109c8c
--- /dev/null
+++ b/src/gpu/effects/GrComposeLerpRedEffect.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2019 Google LLC.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**************************************************************************************************
+ *** This file was autogenerated from GrComposeLerpRedEffect.fp; do not modify.
+ **************************************************************************************************/
+#ifndef GrComposeLerpRedEffect_DEFINED
+#define GrComposeLerpRedEffect_DEFINED
+#include "SkTypes.h"
+#include "GrFragmentProcessor.h"
+#include "GrCoordTransform.h"
+class GrComposeLerpRedEffect : public GrFragmentProcessor {
+public:
+ static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child1,
+ std::unique_ptr<GrFragmentProcessor> child2,
+ std::unique_ptr<GrFragmentProcessor> lerp) {
+ return std::unique_ptr<GrFragmentProcessor>(
+ new GrComposeLerpRedEffect(std::move(child1), std::move(child2), std::move(lerp)));
+ }
+ GrComposeLerpRedEffect(const GrComposeLerpRedEffect& src);
+ std::unique_ptr<GrFragmentProcessor> clone() const override;
+ const char* name() const override { return "ComposeLerpRedEffect"; }
+ int child1_index = -1;
+ int child2_index = -1;
+ int lerp_index = -1;
+
+private:
+ GrComposeLerpRedEffect(std::unique_ptr<GrFragmentProcessor> child1,
+ std::unique_ptr<GrFragmentProcessor> child2,
+ std::unique_ptr<GrFragmentProcessor> lerp)
+ : INHERITED(kGrComposeLerpRedEffect_ClassID, kNone_OptimizationFlags) {
+ if (child1) {
+ child1_index = this->numChildProcessors();
+ this->registerChildProcessor(std::move(child1));
+ }
+ if (child2) {
+ child2_index = this->numChildProcessors();
+ this->registerChildProcessor(std::move(child2));
+ }
+ SkASSERT(lerp);
+ lerp_index = this->numChildProcessors();
+ this->registerChildProcessor(std::move(lerp));
+ }
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
+ void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ bool onIsEqual(const GrFragmentProcessor&) const override;
+ GR_DECLARE_FRAGMENT_PROCESSOR_TEST
+ typedef GrFragmentProcessor INHERITED;
+};
+#endif