Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | Friends | List of all members
flutter::DlSweepGradientColorSource Class Referencefinal

#include <dl_color_source.h>

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

Public Member Functions

const DlSweepGradientColorSourceasSweepGradient () 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. More...
 
std::shared_ptr< DlColorSourceshared () const override
 
DlColorSourceType type () const override
 
size_t size () const override
 
SkPoint center () const
 
SkScalar start () const
 
SkScalar end () 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. More...
 
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 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. More...
 
virtual bool isGradient () const
 If the underlying platform data represents a gradient. More...
 
virtual const DlColorColorSourceasColor () const
 
virtual const DlImageColorSourceasImage () const
 
virtual const DlLinearGradientColorSourceasLinearGradient () 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 >
virtual DlColorSourceType type () const=0
 
virtual size_t size () const=0
 
virtual std::shared_ptr< DlColorSourceshared () const=0
 
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
 
virtual const void * pod () const =0
 
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
 
virtual bool equals_ (DlColorSource const &other) const=0
 

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 568 of file dl_color_source.h.

Member Function Documentation

◆ asSweepGradient()

const DlSweepGradientColorSource * flutter::DlSweepGradientColorSource::asSweepGradient ( ) const
inlineoverridevirtual

Reimplemented from flutter::DlColorSource.

Definition at line 570 of file dl_color_source.h.

570 {
571 return this;
572 }

◆ center()

SkPoint flutter::DlSweepGradientColorSource::center ( ) const
inline

Definition at line 586 of file dl_color_source.h.

586{ return center_; }

◆ end()

SkScalar flutter::DlSweepGradientColorSource::end ( ) const
inline

Definition at line 588 of file dl_color_source.h.

588{ return end_; }

◆ equals_()

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

Implements flutter::DlAttribute< DlColorSource, DlColorSourceType >.

Definition at line 593 of file dl_color_source.h.

593 {
595 auto that = static_cast<DlSweepGradientColorSource const*>(&other);
596 return (center_ == that->center_ && start_ == that->start_ &&
597 end_ == that->end_ && base_equals_(that));
598 }
bool base_equals_(DlGradientColorSourceBase const *other_base) const
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ isUIThreadSafe()

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

574{ return true; }

◆ pod()

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

Implements flutter::DlGradientColorSourceBase.

Definition at line 591 of file dl_color_source.h.

591{ return this + 1; }

◆ shared()

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

Implements flutter::DlAttribute< DlColorSource, DlColorSourceType >.

Definition at line 576 of file dl_color_source.h.

576 {
577 return MakeSweep(center_, start_, end_, stop_count(), colors(), stops(),
578 tile_mode(), matrix_ptr());
579 }
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)
const DlColor * colors() const
const SkMatrix * matrix_ptr() const

◆ size()

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

Implements flutter::DlAttribute< DlColorSource, DlColorSourceType >.

Definition at line 584 of file dl_color_source.h.

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

◆ start()

SkScalar flutter::DlSweepGradientColorSource::start ( ) const
inline

Definition at line 587 of file dl_color_source.h.

587{ return start_; }

◆ type()

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

Friends And Related Function Documentation

◆ DisplayListBuilder

friend class DisplayListBuilder
friend

Definition at line 631 of file dl_color_source.h.

◆ DlColorSource

friend class DlColorSource
friend

Definition at line 630 of file dl_color_source.h.


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