aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrUnpremulInputFragmentProcessor.h
blob: 4e40b3bb4b7856b7f890663dc734ffcb4979c64d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * Copyright 2018 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/**************************************************************************************************
 *** This file was autogenerated from GrUnpremulInputFragmentProcessor.fp; do not modify.
 **************************************************************************************************/
#ifndef GrUnpremulInputFragmentProcessor_DEFINED
#define GrUnpremulInputFragmentProcessor_DEFINED
#include "SkTypes.h"
#include "GrFragmentProcessor.h"
#include "GrCoordTransform.h"
class GrUnpremulInputFragmentProcessor : public GrFragmentProcessor {
public:
    GrColor4f constantOutputForConstantInput(GrColor4f input) const override {
        return input.unpremul();
    }
    static std::unique_ptr<GrFragmentProcessor> Make() {
        return std::unique_ptr<GrFragmentProcessor>(new GrUnpremulInputFragmentProcessor());
    }
    GrUnpremulInputFragmentProcessor(const GrUnpremulInputFragmentProcessor& src);
    std::unique_ptr<GrFragmentProcessor> clone() const override;
    const char* name() const override { return "UnpremulInputFragmentProcessor"; }

private:
    GrUnpremulInputFragmentProcessor()
            : INHERITED(kGrUnpremulInputFragmentProcessor_ClassID,
                        (OptimizationFlags)kPreservesOpaqueInput_OptimizationFlag |
                                kConstantOutputForConstantInput_OptimizationFlag) {}
    GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
    void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
    bool onIsEqual(const GrFragmentProcessor&) const override;
    GR_DECLARE_FRAGMENT_PROCESSOR_TEST
    typedef GrFragmentProcessor INHERITED;
};
#endif