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 | |
14 | #include "include/core/SkM44.h" |
15 | #include "include/core/SkTypes.h" |
16 | |
17 | #include "src/gpu/GrFragmentProcessor.h" |
18 | |
19 | class GrDeviceSpaceEffect : public GrFragmentProcessor { |
20 | public: |
21 | SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& inColor) const override { |
22 | return ConstantOutputForConstantInput(this->childProcessor(0), inColor); |
23 | } |
24 | |
25 | static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> fp) { |
26 | return std::unique_ptr<GrFragmentProcessor>(new GrDeviceSpaceEffect(std::move(fp))); |
27 | } |
28 | GrDeviceSpaceEffect(const GrDeviceSpaceEffect& src); |
29 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
30 | const char* name() const override { return "DeviceSpaceEffect"; } |
31 | |
32 | private: |
33 | GrDeviceSpaceEffect(std::unique_ptr<GrFragmentProcessor> fp) |
34 | : INHERITED(kGrDeviceSpaceEffect_ClassID, |
35 | (OptimizationFlags)ProcessorOptimizationFlags(fp.get())) { |
36 | SkASSERT(fp); |
37 | this->registerChild(std::move(fp), SkSL::SampleUsage::Explicit()); |
38 | } |
39 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
40 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
41 | bool onIsEqual(const GrFragmentProcessor&) const override; |
42 | #if GR_TEST_UTILS |
43 | SkString onDumpInfo() const override; |
44 | #endif |
45 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
46 | typedef GrFragmentProcessor INHERITED; |
47 | }; |
48 | #endif |
49 |