Re-re-land sksl fragment processor support
This reverts commit 5ce397205528f82084fc650c2ce27d246c01da33.
Bug: skia:
Change-Id: I88260c90004610a1cf8ad1a87c2b4b222525bbb6
Reviewed-on: https://skia-review.googlesource.com/21108
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/effects/GrDitherEffect.h b/src/gpu/effects/GrDitherEffect.h
index b92723d..32cb872 100644
--- a/src/gpu/effects/GrDitherEffect.h
+++ b/src/gpu/effects/GrDitherEffect.h
@@ -1,24 +1,33 @@
/*
- * Copyright 2014 Google Inc.
+ * Copyright 2017 Google Inc.
*
* 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 GrDitherEffect.fp; do not modify.
+ */
#ifndef GrDitherEffect_DEFINED
#define GrDitherEffect_DEFINED
-
-#include "GrTypes.h"
-#include "GrTypesPriv.h"
-#include "SkRefCnt.h"
-
-class GrFragmentProcessor;
-
-namespace GrDitherEffect {
- /**
- * Creates an effect that dithers the resulting color to an RGBA8 framebuffer
- */
- sk_sp<GrFragmentProcessor> Make();
+#include "GrFragmentProcessor.h"
+#include "GrCoordTransform.h"
+#include "effects/GrProxyMove.h"
+class GrDitherEffect : public GrFragmentProcessor {
+public:
+ static sk_sp<GrFragmentProcessor> Make() {
+ return sk_sp<GrFragmentProcessor>(new GrDitherEffect());
+ }
+ const char* name() const override { return "DitherEffect"; }
+private:
+ GrDitherEffect()
+ : INHERITED(kNone_OptimizationFlags) {
+ this->initClassID<GrDitherEffect>();
+ }
+ 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