Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkRuntimeColorFilter.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 SkRuntimeColorFilter_DEFINED
9#define SkRuntimeColorFilter_DEFINED
10
11#include "include/core/SkData.h"
14#include "include/core/SkSpan.h"
18
19#include <vector>
20
21class SkReadBuffer;
22class SkWriteBuffer;
23struct SkStageRec;
24
26public:
30
31 bool appendStages(const SkStageRec& rec, bool) const override;
32
33 bool onIsAlphaUnchanged() const override;
34
35 void flatten(SkWriteBuffer& buffer) const override;
36
37 SkRuntimeEffect* asRuntimeEffect() const override;
38
39 SkColorFilterBase::Type type() const override { return SkColorFilterBase::Type::kRuntime; }
40
42
43 sk_sp<SkRuntimeEffect> effect() const { return fEffect; }
44 sk_sp<const SkData> uniforms() const { return fUniforms; }
46
47private:
49 sk_sp<const SkData> fUniforms;
50 std::vector<SkRuntimeEffect::ChildPtr> fChildren;
51};
52
53#endif
#define SK_FLATTENABLE_HOOKS(type)
bool appendStages(const SkStageRec &rec, bool) const override
SkSpan< const SkRuntimeEffect::ChildPtr > children() const
void flatten(SkWriteBuffer &buffer) const override
bool onIsAlphaUnchanged() const override
sk_sp< SkRuntimeEffect > effect() const
SkColorFilterBase::Type type() const override
SkRuntimeEffect * asRuntimeEffect() const override
sk_sp< const SkData > uniforms() const
static const uint8_t buffer[]