blob: 5f005c138d578f80f8d3811d508aa034b89eaf2c [file] [log] [blame]
Ethan Nicholasbe0a0422017-11-17 13:44:05 -05001/*
Ethan Nicholas130fb3f2018-02-01 12:14:34 -05002 * Copyright 2018 Google Inc.
Ethan Nicholasbe0a0422017-11-17 13:44:05 -05003 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
Ethan Nicholas130fb3f2018-02-01 12:14:34 -05008/**************************************************************************************************
9 *** This file was autogenerated from GrPremulInputFragmentProcessor.fp; do not modify.
10 **************************************************************************************************/
Ethan Nicholasbe0a0422017-11-17 13:44:05 -050011#ifndef GrPremulInputFragmentProcessor_DEFINED
12#define GrPremulInputFragmentProcessor_DEFINED
13#include "SkTypes.h"
14#if SK_SUPPORT_GPU
15#include "GrFragmentProcessor.h"
16#include "GrCoordTransform.h"
17class GrPremulInputFragmentProcessor : public GrFragmentProcessor {
18public:
19 GrColor4f constantOutputForConstantInput(GrColor4f input) const override {
20 return input.premul();
21 }
22 static std::unique_ptr<GrFragmentProcessor> Make() {
23 return std::unique_ptr<GrFragmentProcessor>(new GrPremulInputFragmentProcessor());
24 }
25 GrPremulInputFragmentProcessor(const GrPremulInputFragmentProcessor& src);
26 std::unique_ptr<GrFragmentProcessor> clone() const override;
27 const char* name() const override { return "PremulInputFragmentProcessor"; }
28
29private:
30 GrPremulInputFragmentProcessor()
31 : INHERITED(kGrPremulInputFragmentProcessor_ClassID,
32 (OptimizationFlags)kPreservesOpaqueInput_OptimizationFlag |
33 kConstantOutputForConstantInput_OptimizationFlag) {}
34 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
35 void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
36 bool onIsEqual(const GrFragmentProcessor&) const override;
37 GR_DECLARE_FRAGMENT_PROCESSOR_TEST
38 typedef GrFragmentProcessor INHERITED;
39};
40#endif
41#endif