#include <dl_color_source.h>
Public Member Functions | |
| virtual bool | is_opaque () const =0 |
| virtual bool | isUIThreadSafe () const =0 |
| 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. | |
| virtual bool | isGradient () const |
| If the underlying platform data represents a gradient. | |
| virtual const DlImageColorSource * | asImage () const |
| virtual const DlLinearGradientColorSource * | asLinearGradient () const |
| virtual const DlRadialGradientColorSource * | asRadialGradient () const |
| virtual const DlConicalGradientColorSource * | asConicalGradient () const |
| virtual const DlSweepGradientColorSource * | asSweepGradient () const |
| virtual const DlRuntimeEffectColorSource * | asRuntimeEffect () const |
Public Member Functions inherited from flutter::DlAttribute< DlColorSource, DlColorSourceType > | |
| virtual DlColorSourceType | type () const=0 |
| virtual size_t | size () const=0 |
| virtual std::shared_ptr< DlColorSource > | shared () const=0 |
| bool | operator== (DlColorSource const &other) const |
| bool | operator!= (DlColorSource const &other) const |
| virtual | ~DlAttribute ()=default |
Static Public Member Functions | |
| static std::shared_ptr< DlColorSource > | MakeImage (const sk_sp< const DlImage > &image, DlTileMode horizontal_tile_mode, DlTileMode vertical_tile_mode, DlImageSampling sampling=DlImageSampling::kLinear, const DlMatrix *matrix=nullptr) |
| static std::shared_ptr< DlColorSource > | MakeLinear (const DlPoint start_point, const DlPoint end_point, uint32_t stop_count, const DlColor *colors, const float *stops, DlTileMode tile_mode, const DlMatrix *matrix=nullptr) |
| static std::shared_ptr< DlColorSource > | MakeLinear (const DlPoint start_point, const DlPoint end_point, uint32_t stop_count, const DlScalar *colors_argb, const float *stops, DlTileMode tile_mode, const DlMatrix *matrix=nullptr) |
| Make a linear gradient. | |
| static std::shared_ptr< DlColorSource > | MakeRadial (DlPoint center, DlScalar radius, uint32_t stop_count, const DlColor *colors, const float *stops, DlTileMode tile_mode, const DlMatrix *matrix=nullptr) |
| static std::shared_ptr< DlColorSource > | MakeRadial (DlPoint center, DlScalar radius, uint32_t stop_count, const DlScalar *colors_argb, const float *stops, DlTileMode tile_mode, const DlMatrix *matrix=nullptr) |
| Make a radial gradient. | |
| static std::shared_ptr< DlColorSource > | MakeConical (DlPoint start_center, DlScalar start_radius, DlPoint end_center, DlScalar end_radius, uint32_t stop_count, const DlColor *colors, const float *stops, DlTileMode tile_mode, const DlMatrix *matrix=nullptr) |
| static std::shared_ptr< DlColorSource > | MakeConical (DlPoint start_center, DlScalar start_radius, DlPoint end_center, DlScalar end_radius, uint32_t stop_count, const DlScalar *colors_argb, const float *stops, DlTileMode tile_mode, const DlMatrix *matrix=nullptr) |
| Make a conical gradient. | |
| static std::shared_ptr< DlColorSource > | MakeSweep (DlPoint center, DlScalar start, DlScalar end, uint32_t stop_count, const DlColor *colors, const float *stops, DlTileMode tile_mode, const DlMatrix *matrix=nullptr) |
| static std::shared_ptr< DlColorSource > | MakeSweep (DlPoint center, DlScalar start, DlScalar end, uint32_t stop_count, const DlScalar *colors_argb, const float *stops, DlTileMode tile_mode, const DlMatrix *matrix=nullptr) |
| Make a sweep gradient. | |
| static std::shared_ptr< DlColorSource > | MakeRuntimeEffect (sk_sp< DlRuntimeEffect > runtime_effect, std::vector< std::shared_ptr< DlColorSource > > samplers, std::shared_ptr< std::vector< uint8_t > > uniform_data) |
Protected Member Functions | |
| DlColorSource ()=default | |
Protected Member Functions inherited from flutter::DlAttribute< DlColorSource, DlColorSourceType > | |
| virtual bool | equals_ (DlColorSource const &other) const=0 |
Definition at line 44 of file dl_color_source.h.
|
protecteddefault |
|
inlinevirtual |
Reimplemented in flutter::DlConicalGradientColorSource.
Definition at line 188 of file dl_color_source.h.
Referenced by impeller::Paint::CreateContents(), flutter::testing::DisplayListStreamDispatcher::setColorSource(), flutter::testing::TEST(), and flutter::ToSk().
|
inlinevirtual |
Reimplemented in flutter::DlImageColorSource.
Definition at line 172 of file dl_color_source.h.
Referenced by impeller::Paint::CreateContents(), impeller::Canvas::DrawVertices(), flutter::testing::DisplayListStreamDispatcher::setColorSource(), and flutter::ToSk().
|
inlinevirtual |
Reimplemented in flutter::DlLinearGradientColorSource.
Definition at line 176 of file dl_color_source.h.
Referenced by impeller::Paint::CreateContents(), flutter::testing::DisplayListStreamDispatcher::setColorSource(), flutter::testing::TEST(), and flutter::ToSk().
|
inlinevirtual |
Reimplemented in flutter::DlRadialGradientColorSource.
Definition at line 182 of file dl_color_source.h.
Referenced by impeller::Paint::CreateContents(), flutter::testing::DisplayListStreamDispatcher::setColorSource(), flutter::testing::TEST(), and flutter::ToSk().
|
inlinevirtual |
Reimplemented in flutter::DlRuntimeEffectColorSource.
Definition at line 198 of file dl_color_source.h.
Referenced by impeller::Paint::CreateContents(), flutter::testing::TEST(), and flutter::ToSk().
|
inlinevirtual |
Reimplemented in flutter::DlSweepGradientColorSource.
Definition at line 194 of file dl_color_source.h.
Referenced by impeller::Paint::CreateContents(), flutter::testing::DisplayListStreamDispatcher::setColorSource(), flutter::testing::TEST(), and flutter::ToSk().
|
pure virtual |
Implemented in flutter::DlGradientColorSourceBase, flutter::DlImageColorSource, and flutter::DlRuntimeEffectColorSource.
|
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.
Reimplemented in flutter::DlGradientColorSourceBase.
Definition at line 168 of file dl_color_source.h.
Referenced by flutter::DlSkPaintDispatchHelper::setColorSource().
|
pure virtual |
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.
Implemented in flutter::DlConicalGradientColorSource, flutter::DlImageColorSource, flutter::DlLinearGradientColorSource, flutter::DlRadialGradientColorSource, flutter::DlRuntimeEffectColorSource, and flutter::DlSweepGradientColorSource.
|
static |
Definition at line 120 of file dl_color_source.cc.
References flutter::DlGradientDeleter().
Referenced by impeller::testing::CanRenderConicalGradientWithDithering(), flutter::CanvasGradient::initTwoPointConical(), impeller::interop::ColorSource::MakeConicalGradient(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST_F(), and impeller::testing::TEST_P().
|
static |
Make a conical gradient.
| colors_argb | colors_argb Array of DlScalars that represents colors in the ARGB format, in the extended srgb colorspace. |
Definition at line 142 of file dl_color_source.cc.
References flutter::DlGradientDeleter().
|
static |
Definition at line 23 of file dl_color_source.cc.
References image.
Referenced by flutter::SurfaceTextureExternalTexture::DrawFrame(), flutter::ImageShader::initWithImage(), impeller::interop::ColorSource::MakeImage(), impeller::interop::ReadSamplersAndUniforms(), flutter::testing::TEST(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
|
static |
Definition at line 41 of file dl_color_source.cc.
References flutter::DlGradientDeleter().
Referenced by impeller::testing::CanRenderLinearGradientWithDithering(), impeller::testing::DoGradientOvalStrokeMaskBlur(), flutter::CanvasGradient::initLinear(), flutter::testing::MakeFilter(), impeller::interop::ColorSource::MakeLinearGradient(), flutter::testing::CanvasCompareTester::RenderWithAttributes(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
|
static |
Make a linear gradient.
| colors_argb | Array of DlScalars that represents colors in the ARGB format, in the extended srgb colorspace. |
Definition at line 61 of file dl_color_source.cc.
References flutter::DlGradientDeleter().
|
static |
Definition at line 81 of file dl_color_source.cc.
References flutter::DlGradientDeleter().
Referenced by impeller::testing::CanRenderRadialGradientWithDithering(), flutter::CanvasGradient::initRadial(), impeller::interop::ColorSource::MakeRadialGradient(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
|
static |
Make a radial gradient.
| colors_argb | Array of DlScalars that represents colors in the ARGB format, in the extended srgb colorspace. |
Definition at line 100 of file dl_color_source.cc.
References flutter::DlGradientDeleter().
|
static |
Definition at line 205 of file dl_color_source.cc.
References FML_DCHECK.
Referenced by flutter::FragmentProgram::MakeDlColorSource(), impeller::interop::ColorSource::MakeFragmentProgram(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
|
static |
Definition at line 165 of file dl_color_source.cc.
References flutter::DlGradientDeleter(), end, and start.
Referenced by impeller::testing::CanRenderSweepGradientWithDithering(), flutter::CanvasGradient::initSweep(), impeller::interop::ColorSource::MakeSweepGradient(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
|
static |
Make a sweep gradient.
| colors_argb | Array of DlScalars that represents colors in the ARGB format, in the extended srgb colorspace. |
Definition at line 185 of file dl_color_source.cc.
References flutter::DlGradientDeleter(), end, and start.