1 | /* |
---|---|
2 | * Copyright 2020 Google LLC |
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 GrDeviceSpaceEffect.fp; do not modify. |
10 | **************************************************************************************************/ |
11 | #ifndef GrDeviceSpaceEffect_DEFINED |
12 | #define GrDeviceSpaceEffect_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" |
18 | class GrDeviceSpaceEffect : public GrFragmentProcessor { |
19 | public: |
20 | static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> fp) { |
21 | return std::unique_ptr<GrFragmentProcessor>(new GrDeviceSpaceEffect(std::move(fp))); |
22 | } |
23 | GrDeviceSpaceEffect(const GrDeviceSpaceEffect& src); |
24 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
25 | const char* name() const override { return "DeviceSpaceEffect"; } |
26 | int fp_index = -1; |
27 | |
28 | private: |
29 | GrDeviceSpaceEffect(std::unique_ptr<GrFragmentProcessor> fp) |
30 | : INHERITED(kGrDeviceSpaceEffect_ClassID, kNone_OptimizationFlags) { |
31 | SkASSERT(fp); |
32 | fp_index = this->numChildProcessors(); |
33 | fp->setSampledWithExplicitCoords(true); |
34 | this->registerChildProcessor(std::move(fp)); |
35 | } |
36 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
37 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
38 | bool onIsEqual(const GrFragmentProcessor&) const override; |
39 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
40 | typedef GrFragmentProcessor INHERITED; |
41 | }; |
42 | #endif |
43 |