Flutter Engine
 
Loading...
Searching...
No Matches
dl_runtime_effect_color_source.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_DISPLAY_LIST_EFFECTS_COLOR_SOURCES_DL_RUNTIME_EFFECT_COLOR_SOURCE_H_
6#define FLUTTER_DISPLAY_LIST_EFFECTS_COLOR_SOURCES_DL_RUNTIME_EFFECT_COLOR_SOURCE_H_
7
9
10namespace flutter {
11
13 public:
15 sk_sp<DlRuntimeEffect> runtime_effect,
16 std::vector<std::shared_ptr<DlColorSource>> samplers,
17 std::shared_ptr<std::vector<uint8_t>> uniform_data);
18
19 bool isUIThreadSafe() const override;
20
22 return this;
23 }
24
25 std::shared_ptr<DlColorSource> shared() const override;
26
27 DlColorSourceType type() const override {
29 }
30 size_t size() const override { return sizeof(*this); }
31
32 bool is_opaque() const override { return false; }
33
34 const sk_sp<DlRuntimeEffect> runtime_effect() const {
35 return runtime_effect_;
36 }
37 const std::vector<std::shared_ptr<DlColorSource>> samplers() const {
38 return samplers_;
39 }
40 const std::shared_ptr<std::vector<uint8_t>> uniform_data() const {
41 return uniform_data_;
42 }
43
44 protected:
45 bool equals_(DlColorSource const& other) const override;
46
47 private:
48 sk_sp<DlRuntimeEffect> runtime_effect_;
49 std::vector<std::shared_ptr<DlColorSource>> samplers_;
50 std::shared_ptr<std::vector<uint8_t>> uniform_data_;
51
53};
54
55} // namespace flutter
56
57#endif // FLUTTER_DISPLAY_LIST_EFFECTS_COLOR_SOURCES_DL_RUNTIME_EFFECT_COLOR_SOURCE_H_
std::shared_ptr< DlColorSource > shared() const override
bool isUIThreadSafe() const override
If the underlying platform data held by this object is held in a way that it can be stored and potent...
const std::shared_ptr< std::vector< uint8_t > > uniform_data() const
const DlRuntimeEffectColorSource * asRuntimeEffect() const override
bool equals_(DlColorSource const &other) const override
const sk_sp< DlRuntimeEffect > runtime_effect() const
const std::vector< std::shared_ptr< DlColorSource > > samplers() const
#define FML_DISALLOW_COPY_ASSIGN_AND_MOVE(TypeName)
Definition macros.h:31