blob: 61cc53baa557af3658bca304c7110ed523630f64 [file] [log] [blame]
Jim Van Verth91af7272017-01-27 14:15:54 -05001/*
2 * Copyright 2017 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
Ethan Nicholas0274b302017-07-14 16:17:04 -04008/*
9 * This file was autogenerated from GrBlurredEdgeFragmentProcessor.fp; do not modify.
10 */
Jim Van Verth91af7272017-01-27 14:15:54 -050011#ifndef GrBlurredEdgeFragmentProcessor_DEFINED
12#define GrBlurredEdgeFragmentProcessor_DEFINED
Ethan Nicholas0274b302017-07-14 16:17:04 -040013#include "SkTypes.h"
14#if SK_SUPPORT_GPU
Jim Van Verth91af7272017-01-27 14:15:54 -050015#include "GrFragmentProcessor.h"
Ethan Nicholas0274b302017-07-14 16:17:04 -040016#include "GrCoordTransform.h"
17#include "GrColorSpaceXform.h"
Ethan Nicholas0274b302017-07-14 16:17:04 -040018class GrBlurredEdgeFragmentProcessor : public GrFragmentProcessor {
Jim Van Verth91af7272017-01-27 14:15:54 -050019public:
Ethan Nicholasb7e8c3b2017-07-19 13:54:20 -040020 enum Mode { kGaussian_Mode = 0, kSmoothStep_Mode = 1 };
Ethan Nicholas0274b302017-07-14 16:17:04 -040021 int mode() const { return fMode; }
Brian Salomonaff329b2017-08-11 09:40:37 -040022 static std::unique_ptr<GrFragmentProcessor> Make(int mode) {
23 return std::unique_ptr<GrFragmentProcessor>(new GrBlurredEdgeFragmentProcessor(mode));
Jim Van Verth91af7272017-01-27 14:15:54 -050024 }
Ethan Nicholasf57c0d62017-07-31 11:18:22 -040025 GrBlurredEdgeFragmentProcessor(const GrBlurredEdgeFragmentProcessor& src);
Brian Salomonaff329b2017-08-11 09:40:37 -040026 std::unique_ptr<GrFragmentProcessor> clone() const override;
Ethan Nicholas0274b302017-07-14 16:17:04 -040027 const char* name() const override { return "BlurredEdgeFragmentProcessor"; }
Ethan Nicholasb7e8c3b2017-07-19 13:54:20 -040028
Jim Van Verth91af7272017-01-27 14:15:54 -050029private:
Ethan Nicholasb7e8c3b2017-07-19 13:54:20 -040030 GrBlurredEdgeFragmentProcessor(int mode) : INHERITED(kNone_OptimizationFlags), fMode(mode) {
Ethan Nicholas0274b302017-07-14 16:17:04 -040031 this->initClassID<GrBlurredEdgeFragmentProcessor>();
Jim Van Verth91af7272017-01-27 14:15:54 -050032 }
Jim Van Verth91af7272017-01-27 14:15:54 -050033 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
Ethan Nicholasb7e8c3b2017-07-19 13:54:20 -040034 void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
Jim Van Verth91af7272017-01-27 14:15:54 -050035 bool onIsEqual(const GrFragmentProcessor&) const override;
Brian Salomon0c26a9d2017-07-06 10:09:38 -040036 GR_DECLARE_FRAGMENT_PROCESSOR_TEST
Ethan Nicholas0274b302017-07-14 16:17:04 -040037 int fMode;
Jim Van Verth91af7272017-01-27 14:15:54 -050038 typedef GrFragmentProcessor INHERITED;
39};
Ethan Nicholas0274b302017-07-14 16:17:04 -040040#endif
Jim Van Verth91af7272017-01-27 14:15:54 -050041#endif