Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrColorTableEffect.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 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#ifndef GrColorTableEffect_DEFINED
9#define GrColorTableEffect_DEFINED
10
13
14#include <memory>
15
18class SkBitmap;
19struct GrShaderCaps;
20
21namespace skgpu {
22class KeyBuilder;
23}
24
26public:
27 static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> inputFP,
28 GrRecordingContext* context,
29 const SkBitmap& bitmap);
30
31 ~ColorTableEffect() override {}
32
33 const char* name() const override { return "ColorTableEffect"; }
34
35 std::unique_ptr<GrFragmentProcessor> clone() const override {
36 return std::unique_ptr<GrFragmentProcessor>(new ColorTableEffect(*this));
37 }
38
39 inline static constexpr int kTexEffectFPIndex = 0;
40 inline static constexpr int kInputFPIndex = 1;
41
42private:
43 std::unique_ptr<ProgramImpl> onMakeProgramImpl() const override;
44
45 void onAddToKey(const GrShaderCaps&, skgpu::KeyBuilder*) const override {}
46
47 bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
48
49 ColorTableEffect(std::unique_ptr<GrFragmentProcessor> inputFP, GrSurfaceProxyView view);
50
51 explicit ColorTableEffect(const ColorTableEffect& that);
52
54};
55
56#endif
#define GR_DECLARE_FRAGMENT_PROCESSOR_TEST
std::unique_ptr< GrFragmentProcessor > clone() const override
void onAddToKey(const GrShaderCaps &, skgpu::KeyBuilder *) const override
bool onIsEqual(const GrFragmentProcessor &) const override
static constexpr int kInputFPIndex
static std::unique_ptr< GrFragmentProcessor > Make(std::unique_ptr< GrFragmentProcessor > inputFP, GrRecordingContext *context, const SkBitmap &bitmap)
~ColorTableEffect() override
std::unique_ptr< ProgramImpl > onMakeProgramImpl() const override
static constexpr int kTexEffectFPIndex
const char * name() const override