#include <dl_color_source.h>
|
static std::shared_ptr< DlLinearGradientColorSource > | MakeLinear (const SkPoint start_point, const SkPoint end_point, uint32_t stop_count, const DlColor *colors, const float *stops, DlTileMode tile_mode, const SkMatrix *matrix=nullptr) |
|
static std::shared_ptr< DlRadialGradientColorSource > | MakeRadial (SkPoint center, SkScalar radius, uint32_t stop_count, const DlColor *colors, const float *stops, DlTileMode tile_mode, const SkMatrix *matrix=nullptr) |
|
static std::shared_ptr< DlConicalGradientColorSource > | MakeConical (SkPoint start_center, SkScalar start_radius, SkPoint end_center, SkScalar end_radius, uint32_t stop_count, const DlColor *colors, const float *stops, DlTileMode tile_mode, const SkMatrix *matrix=nullptr) |
|
static std::shared_ptr< DlSweepGradientColorSource > | MakeSweep (SkPoint center, SkScalar start, SkScalar end, uint32_t stop_count, const DlColor *colors, const float *stops, DlTileMode tile_mode, const SkMatrix *matrix=nullptr) |
|
static std::shared_ptr< DlRuntimeEffectColorSource > | MakeRuntimeEffect (sk_sp< DlRuntimeEffect > runtime_effect, std::vector< std::shared_ptr< DlColorSource > > samplers, std::shared_ptr< std::vector< uint8_t > > uniform_data) |
|
Definition at line 636 of file dl_color_source.h.
◆ DlRuntimeEffectColorSource()
flutter::DlRuntimeEffectColorSource::DlRuntimeEffectColorSource |
( |
sk_sp< DlRuntimeEffect > |
runtime_effect, |
|
|
std::vector< std::shared_ptr< DlColorSource > > |
samplers, |
|
|
std::shared_ptr< std::vector< uint8_t > > |
uniform_data |
|
) |
| |
|
inline |
Definition at line 638 of file dl_color_source.h.
const std::shared_ptr< std::vector< uint8_t > > uniform_data() const
const sk_sp< DlRuntimeEffect > runtime_effect() const
const std::vector< std::shared_ptr< DlColorSource > > samplers() const
◆ asRuntimeEffect()
◆ equals_()
bool flutter::DlRuntimeEffectColorSource::equals_ |
( |
DlColorSource const & |
other | ) |
const |
|
inlineoverrideprotectedvirtual |
Implements flutter::DlAttribute< DlColorSource, DlColorSourceType >.
Definition at line 682 of file dl_color_source.h.
682 {
685 if (runtime_effect_ != that->runtime_effect_) {
686 return false;
687 }
688 if (uniform_data_ != that->uniform_data_) {
689 return false;
690 }
691 if (samplers_.size() != that->samplers_.size()) {
692 return false;
693 }
694 for (
size_t i = 0;
i < samplers_.size();
i++) {
695 if (samplers_[
i] != that->samplers_[
i]) {
696 return false;
697 }
698 }
699 return true;
700 }
DlRuntimeEffectColorSource(sk_sp< DlRuntimeEffect > runtime_effect, std::vector< std::shared_ptr< DlColorSource > > samplers, std::shared_ptr< std::vector< uint8_t > > uniform_data)
#define FML_DCHECK(condition)
◆ is_opaque()
bool flutter::DlRuntimeEffectColorSource::is_opaque |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ isUIThreadSafe()
bool flutter::DlRuntimeEffectColorSource::isUIThreadSafe |
( |
| ) |
const |
|
inlineoverridevirtual |
If the underlying platform data held by this object is held in a way that it can be stored and potentially released from the UI thread, this method returns true.
- Returns
- True if the class has no GPU related resources or if any that it holds are held in a thread-safe manner.
Implements flutter::DlColorSource.
Definition at line 646 of file dl_color_source.h.
646 {
647 for (const auto& sampler : samplers_) {
648 if (!sampler->isUIThreadSafe()) {
649 return false;
650 }
651 }
652 return true;
653 }
◆ runtime_effect()
◆ samplers()
const std::vector< std::shared_ptr< DlColorSource > > flutter::DlRuntimeEffectColorSource::samplers |
( |
| ) |
const |
|
inline |
◆ shared()
std::shared_ptr< DlColorSource > flutter::DlRuntimeEffectColorSource::shared |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ size()
size_t flutter::DlRuntimeEffectColorSource::size |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ type()
◆ uniform_data()
const std::shared_ptr< std::vector< uint8_t > > flutter::DlRuntimeEffectColorSource::uniform_data |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: