#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 64 of file dl_color_source.h.
◆ DlColorSource()
flutter::DlColorSource::DlColorSource |
( |
| ) |
|
|
protecteddefault |
◆ asColor()
◆ asConicalGradient()
◆ asImage()
◆ asLinearGradient()
◆ asRadialGradient()
◆ asRuntimeEffect()
◆ asSweepGradient()
◆ is_opaque()
virtual bool flutter::DlColorSource::is_opaque |
( |
| ) |
const |
|
pure virtual |
◆ isGradient()
virtual bool flutter::DlColorSource::isGradient |
( |
| ) |
const |
|
inlinevirtual |
If the underlying platform data represents a gradient.
TODO(matanl): Remove this flag when the Skia backend is
removed, https://github.com/flutter/flutter/issues/112498.
- Returns
- True if the class represents the output of a gradient.
Reimplemented in flutter::DlGradientColorSourceBase.
Definition at line 130 of file dl_color_source.h.
◆ isUIThreadSafe()
virtual bool flutter::DlColorSource::isUIThreadSafe |
( |
| ) |
const |
|
pure virtual |
◆ MakeConical()
Definition at line 63 of file dl_color_source.cc.
72 {
73 size_t needed = sizeof(DlConicalGradientColorSource) +
74 (stop_count * (sizeof(uint32_t) + sizeof(float)));
75
76 void* storage = ::operator new(needed);
77
78 std::shared_ptr<DlConicalGradientColorSource> ret;
79 ret.reset(new (storage) DlConicalGradientColorSource(
80 start_center, start_radius, end_center, end_radius, stop_count,
83 return ret;
84}
unsigned useCenter Optional< SkMatrix > matrix
PODArray< SkColor > colors
static void DlGradientDeleter(void *p)
◆ MakeLinear()
Definition at line 22 of file dl_color_source.cc.
29 {
30 size_t needed = sizeof(DlLinearGradientColorSource) +
31 (stop_count * (sizeof(uint32_t) + sizeof(float)));
32
33 void* storage = ::operator new(needed);
34
35 std::shared_ptr<DlLinearGradientColorSource> ret;
36 ret.reset(new (storage)
37 DlLinearGradientColorSource(start_point, end_point, stop_count,
40 return ret;
41}
◆ MakeRadial()
Definition at line 43 of file dl_color_source.cc.
50 {
51 size_t needed = sizeof(DlRadialGradientColorSource) +
52 (stop_count * (sizeof(uint32_t) + sizeof(float)));
53
54 void* storage = ::operator new(needed);
55
56 std::shared_ptr<DlRadialGradientColorSource> ret;
57 ret.reset(new (storage) DlRadialGradientColorSource(
58 center, radius, stop_count,
colors, stops, tile_mode,
matrix),
60 return ret;
61}
◆ MakeRuntimeEffect()
Definition at line 108 of file dl_color_source.cc.
111 {
113 return std::make_shared<DlRuntimeEffectColorSource>(
114 std::move(runtime_effect), std::move(samplers), std::move(uniform_data));
115}
#define FML_DCHECK(condition)
◆ MakeSweep()
Definition at line 86 of file dl_color_source.cc.
94 {
95 size_t needed = sizeof(DlSweepGradientColorSource) +
96 (stop_count * (sizeof(uint32_t) + sizeof(float)));
97
98 void* storage = ::operator new(needed);
99
100 std::shared_ptr<DlSweepGradientColorSource> ret;
101 ret.reset(new (storage)
102 DlSweepGradientColorSource(center, start, end, stop_count,
105 return ret;
106}
The documentation for this class was generated from the following files: