1 | /* |
---|---|
2 | * Copyright 2018 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 GrConfigConversionEffect.fp; do not modify. |
10 | **************************************************************************************************/ |
11 | #ifndef GrConfigConversionEffect_DEFINED |
12 | #define GrConfigConversionEffect_DEFINED |
13 | |
14 | #include "include/core/SkM44.h" |
15 | #include "include/core/SkTypes.h" |
16 | |
17 | #include "include/gpu/GrDirectContext.h" |
18 | #include "src/gpu/GrBitmapTextureMaker.h" |
19 | #include "src/gpu/GrContextPriv.h" |
20 | #include "src/gpu/GrImageInfo.h" |
21 | #include "src/gpu/GrRenderTargetContext.h" |
22 | |
23 | #include "src/gpu/GrFragmentProcessor.h" |
24 | |
25 | class GrConfigConversionEffect : public GrFragmentProcessor { |
26 | public: |
27 | static bool TestForPreservingPMConversions(GrDirectContext* dContext); |
28 | |
29 | static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> fp, |
30 | PMConversion pmConversion) { |
31 | if (!fp) { |
32 | return nullptr; |
33 | } |
34 | return std::unique_ptr<GrFragmentProcessor>( |
35 | new GrConfigConversionEffect(std::move(fp), pmConversion)); |
36 | } |
37 | GrConfigConversionEffect(const GrConfigConversionEffect& src); |
38 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
39 | const char* name() const override { return "ConfigConversionEffect"; } |
40 | PMConversion pmConversion; |
41 | |
42 | private: |
43 | GrConfigConversionEffect(std::unique_ptr<GrFragmentProcessor> inputFP, |
44 | PMConversion pmConversion) |
45 | : INHERITED(kGrConfigConversionEffect_ClassID, kNone_OptimizationFlags) |
46 | , pmConversion(pmConversion) { |
47 | SkASSERT(inputFP); |
48 | this->registerChild(std::move(inputFP), SkSL::SampleUsage::PassThrough()); |
49 | } |
50 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
51 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
52 | bool onIsEqual(const GrFragmentProcessor&) const override; |
53 | #if GR_TEST_UTILS |
54 | SkString onDumpInfo() const override; |
55 | #endif |
56 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
57 | typedef GrFragmentProcessor INHERITED; |
58 | }; |
59 | #endif |
60 |