1/*
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
8/**************************************************************************************************
9 *** This file was autogenerated from GrBlurredEdgeFragmentProcessor.fp; do not modify.
10 **************************************************************************************************/
11#ifndef GrBlurredEdgeFragmentProcessor_DEFINED
12#define GrBlurredEdgeFragmentProcessor_DEFINED
13#include "include/core/SkTypes.h"
14#include "include/core/SkM44.h"
15
16#include "src/gpu/GrCoordTransform.h"
17#include "src/gpu/GrFragmentProcessor.h"
18class GrBlurredEdgeFragmentProcessor : public GrFragmentProcessor {
19public:
20 enum class Mode { kGaussian = 0, kSmoothStep = 1 };
21 static std::unique_ptr<GrFragmentProcessor> Make(Mode mode) {
22 return std::unique_ptr<GrFragmentProcessor>(new GrBlurredEdgeFragmentProcessor(mode));
23 }
24 GrBlurredEdgeFragmentProcessor(const GrBlurredEdgeFragmentProcessor& src);
25 std::unique_ptr<GrFragmentProcessor> clone() const override;
26 const char* name() const override { return "BlurredEdgeFragmentProcessor"; }
27 Mode mode;
28
29private:
30 GrBlurredEdgeFragmentProcessor(Mode mode)
31 : INHERITED(kGrBlurredEdgeFragmentProcessor_ClassID, kNone_OptimizationFlags)
32 , mode(mode) {}
33 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
34 void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
35 bool onIsEqual(const GrFragmentProcessor&) const override;
36 GR_DECLARE_FRAGMENT_PROCESSOR_TEST
37 typedef GrFragmentProcessor INHERITED;
38};
39#endif
40