Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Friends | List of all members
flutter::DlLinearGradientColorSource Class Referencefinal

#include <dl_color_source.h>

Inheritance diagram for flutter::DlLinearGradientColorSource:
flutter::DlGradientColorSourceBase flutter::DlMatrixColorSourceBase flutter::DlColorSource flutter::DlAttribute< DlColorSource, DlColorSourceType >

Public Member Functions

const DlLinearGradientColorSourceasLinearGradient () 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 potentially released from the UI thread, this method returns true.
 
DlColorSourceType type () const override
 
size_t size () const override
 
std::shared_ptr< DlColorSourceshared () const override
 
const SkPointstart_point () const
 
const SkPointend_point () const
 
- Public Member Functions inherited from flutter::DlGradientColorSourceBase
bool is_opaque () const override
 
bool isGradient () const override
 If the underlying platform data represents a gradient.
 
DlTileMode tile_mode () const
 
int stop_count () const
 
const DlColorcolors () const
 
const float * stops () const
 
- Public Member Functions inherited from flutter::DlMatrixColorSourceBase
const SkMatrixmatrix () const
 
const SkMatrixmatrix_ptr () const
 
- Public Member Functions inherited from flutter::DlColorSource
virtual const DlColorColorSourceasColor () const
 
virtual const DlImageColorSourceasImage () const
 
virtual const DlRadialGradientColorSourceasRadialGradient () const
 
virtual const DlConicalGradientColorSourceasConicalGradient () const
 
virtual const DlSweepGradientColorSourceasSweepGradient () const
 
virtual const DlRuntimeEffectColorSourceasRuntimeEffect () const
 
- Public Member Functions inherited from flutter::DlAttribute< DlColorSource, DlColorSourceType >
bool operator== (DlColorSource const &other) const
 
bool operator!= (DlColorSource const &other) const
 
virtual ~DlAttribute ()=default
 

Protected Member Functions

virtual const void * pod () const override
 
bool equals_ (DlColorSource const &other) const override
 
- Protected Member Functions inherited from flutter::DlGradientColorSourceBase
 DlGradientColorSourceBase (uint32_t stop_count, DlTileMode tile_mode, const SkMatrix *matrix=nullptr)
 
size_t vector_sizes () const
 
bool base_equals_ (DlGradientColorSourceBase const *other_base) const
 
void store_color_stops (void *pod, const DlColor *color_data, const float *stop_data)
 
- Protected Member Functions inherited from flutter::DlMatrixColorSourceBase
 DlMatrixColorSourceBase (const SkMatrix *matrix)
 
- Protected Member Functions inherited from flutter::DlColorSource
 DlColorSource ()=default
 

Friends

class DlColorSource
 
class DisplayListBuilder
 

Additional Inherited Members

- Static Public Member Functions inherited from flutter::DlColorSource
static std::shared_ptr< DlLinearGradientColorSourceMakeLinear (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< DlRadialGradientColorSourceMakeRadial (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< DlConicalGradientColorSourceMakeConical (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< DlSweepGradientColorSourceMakeSweep (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< DlRuntimeEffectColorSourceMakeRuntimeEffect (sk_sp< DlRuntimeEffect > runtime_effect, std::vector< std::shared_ptr< DlColorSource > > samplers, std::shared_ptr< std::vector< uint8_t > > uniform_data)
 

Detailed Description

Definition at line 363 of file dl_color_source.h.

Member Function Documentation

◆ asLinearGradient()

const DlLinearGradientColorSource * flutter::DlLinearGradientColorSource::asLinearGradient ( ) const
inlineoverridevirtual

Reimplemented from flutter::DlColorSource.

Definition at line 365 of file dl_color_source.h.

365 {
366 return this;
367 }

◆ end_point()

const SkPoint & flutter::DlLinearGradientColorSource::end_point ( ) const
inline

Definition at line 382 of file dl_color_source.h.

382{ return end_point_; }

◆ equals_()

bool flutter::DlLinearGradientColorSource::equals_ ( DlColorSource const &  other) const
inlineoverrideprotectedvirtual

Implements flutter::DlAttribute< DlColorSource, DlColorSourceType >.

Definition at line 387 of file dl_color_source.h.

387 {
389 auto that = static_cast<DlLinearGradientColorSource const*>(&other);
390 return (start_point_ == that->start_point_ &&
391 end_point_ == that->end_point_ && base_equals_(that));
392 }
bool base_equals_(DlGradientColorSourceBase const *other_base) const
#define FML_DCHECK(condition)
Definition logging.h:103

◆ isUIThreadSafe()

bool flutter::DlLinearGradientColorSource::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 369 of file dl_color_source.h.

369{ return true; }

◆ pod()

virtual const void * flutter::DlLinearGradientColorSource::pod ( ) const
inlineoverrideprotectedvirtual

Implements flutter::DlGradientColorSourceBase.

Definition at line 385 of file dl_color_source.h.

385{ return this + 1; }

◆ shared()

std::shared_ptr< DlColorSource > flutter::DlLinearGradientColorSource::shared ( ) const
inlineoverridevirtual

Implements flutter::DlAttribute< DlColorSource, DlColorSourceType >.

Definition at line 376 of file dl_color_source.h.

376 {
377 return MakeLinear(start_point_, end_point_, stop_count(), colors(), stops(),
378 tile_mode(), matrix_ptr());
379 }
const SkMatrix * matrix_ptr() const
static sk_sp< SkShader > MakeLinear()

◆ size()

size_t flutter::DlLinearGradientColorSource::size ( ) const
inlineoverridevirtual

Implements flutter::DlAttribute< DlColorSource, DlColorSourceType >.

Definition at line 374 of file dl_color_source.h.

374{ return sizeof(*this) + vector_sizes(); }

◆ start_point()

const SkPoint & flutter::DlLinearGradientColorSource::start_point ( ) const
inline

Definition at line 381 of file dl_color_source.h.

381{ return start_point_; }

◆ type()

DlColorSourceType flutter::DlLinearGradientColorSource::type ( ) const
inlineoverridevirtual

Friends And Related Symbol Documentation

◆ DisplayListBuilder

friend class DisplayListBuilder
friend

Definition at line 422 of file dl_color_source.h.

◆ DlColorSource

friend class DlColorSource
friend

Definition at line 421 of file dl_color_source.h.


The documentation for this class was generated from the following file: