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

#include <dl_image_filter.h>

Inheritance diagram for flutter::DlBlurImageFilter:
flutter::DlImageFilter flutter::DlAttribute< DlImageFilter, DlImageFilterType >

Public Member Functions

 DlBlurImageFilter (SkScalar sigma_x, SkScalar sigma_y, DlTileMode tile_mode)
 
 DlBlurImageFilter (const DlBlurImageFilter *filter)
 
 DlBlurImageFilter (const DlBlurImageFilter &filter)
 
std::shared_ptr< DlImageFiltershared () const override
 
DlImageFilterType type () const override
 
size_t size () const override
 
const DlBlurImageFilterasBlur () const override
 
bool modifies_transparent_black () const override
 
SkRectmap_local_bounds (const SkRect &input_bounds, SkRect &output_bounds) const override
 
SkIRectmap_device_bounds (const SkIRect &input_bounds, const SkMatrix &ctm, SkIRect &output_bounds) const override
 
SkIRectget_input_device_bounds (const SkIRect &output_bounds, const SkMatrix &ctm, SkIRect &input_bounds) const override
 
SkScalar sigma_x () const
 
SkScalar sigma_y () const
 
DlTileMode tile_mode () const
 
- Public Member Functions inherited from flutter::DlImageFilter
virtual const DlBlurImageFilterasBlur () const
 
virtual const DlDilateImageFilterasDilate () const
 
virtual const DlErodeImageFilterasErode () const
 
virtual const DlMatrixImageFilterasMatrix () const
 
virtual const DlLocalMatrixImageFilterasLocalMatrix () const
 
virtual std::shared_ptr< DlImageFiltermakeWithLocalMatrix (const SkMatrix &matrix) const
 
virtual const DlComposeImageFilterasCompose () const
 
virtual const DlColorFilterImageFilterasColorFilter () const
 
virtual bool modifies_transparent_black () const =0
 
virtual SkRectmap_local_bounds (const SkRect &input_bounds, SkRect &output_bounds) const =0
 
virtual SkIRectmap_device_bounds (const SkIRect &input_bounds, const SkMatrix &ctm, SkIRect &output_bounds) const =0
 
virtual SkIRectget_input_device_bounds (const SkIRect &output_bounds, const SkMatrix &ctm, SkIRect &input_bounds) const =0
 
virtual MatrixCapability matrix_capability () const
 
- Public Member Functions inherited from flutter::DlAttribute< DlImageFilter, DlImageFilterType >
virtual DlImageFilterType type () const=0
 
virtual size_t size () const=0
 
virtual std::shared_ptr< DlImageFiltershared () const=0
 
bool operator== (DlImageFilter const &other) const
 
bool operator!= (DlImageFilter const &other) const
 
virtual ~DlAttribute ()=default
 

Static Public Member Functions

static std::shared_ptr< DlImageFilterMake (SkScalar sigma_x, SkScalar sigma_y, DlTileMode tile_mode)
 

Protected Member Functions

bool equals_ (const DlImageFilter &other) const override
 
virtual bool equals_ (DlImageFilter const &other) const=0
 

Additional Inherited Members

- Public Types inherited from flutter::DlImageFilter
enum class  MatrixCapability { kTranslate , kScaleTranslate , kComplex }
 
- Static Protected Member Functions inherited from flutter::DlImageFilter
static SkVector map_vectors_affine (const SkMatrix &ctm, SkScalar x, SkScalar y)
 
static SkIRectinset_device_bounds (const SkIRect &input_bounds, SkScalar radius_x, SkScalar radius_y, const SkMatrix &ctm, SkIRect &output_bounds)
 
static SkIRectoutset_device_bounds (const SkIRect &input_bounds, SkScalar radius_x, SkScalar radius_y, const SkMatrix &ctm, SkIRect &output_bounds)
 

Detailed Description

Definition at line 220 of file dl_image_filter.h.

Constructor & Destructor Documentation

◆ DlBlurImageFilter() [1/3]

flutter::DlBlurImageFilter::DlBlurImageFilter ( SkScalar  sigma_x,
SkScalar  sigma_y,
DlTileMode  tile_mode 
)
inline

Definition at line 222 of file dl_image_filter.h.

223 : sigma_x_(sigma_x), sigma_y_(sigma_y), tile_mode_(tile_mode) {}
DlTileMode tile_mode() const

◆ DlBlurImageFilter() [2/3]

flutter::DlBlurImageFilter::DlBlurImageFilter ( const DlBlurImageFilter filter)
inlineexplicit

Definition at line 224 of file dl_image_filter.h.

225 : DlBlurImageFilter(filter->sigma_x_,
226 filter->sigma_y_,
227 filter->tile_mode_) {}
DlBlurImageFilter(SkScalar sigma_x, SkScalar sigma_y, DlTileMode tile_mode)

◆ DlBlurImageFilter() [3/3]

flutter::DlBlurImageFilter::DlBlurImageFilter ( const DlBlurImageFilter filter)
inline

Definition at line 228 of file dl_image_filter.h.

229 : DlBlurImageFilter(&filter) {}

Member Function Documentation

◆ asBlur()

const DlBlurImageFilter * flutter::DlBlurImageFilter::asBlur ( ) const
inlineoverridevirtual

Reimplemented from flutter::DlImageFilter.

Definition at line 252 of file dl_image_filter.h.

252{ return this; }

◆ equals_()

bool flutter::DlBlurImageFilter::equals_ ( const DlImageFilter other) const
inlineoverrideprotectedvirtual

Implements flutter::DlAttribute< DlImageFilter, DlImageFilterType >.

Definition at line 281 of file dl_image_filter.h.

281 {
282 FML_DCHECK(other.type() == DlImageFilterType::kBlur);
283 auto that = static_cast<const DlBlurImageFilter*>(&other);
284 return (sigma_x_ == that->sigma_x_ && sigma_y_ == that->sigma_y_ &&
285 tile_mode_ == that->tile_mode_);
286 }
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ get_input_device_bounds()

SkIRect * flutter::DlBlurImageFilter::get_input_device_bounds ( const SkIRect output_bounds,
const SkMatrix ctm,
SkIRect input_bounds 
) const
inlineoverridevirtual

Implements flutter::DlImageFilter.

Definition at line 269 of file dl_image_filter.h.

271 {
272 // Blurs are symmetric in terms of output-for-input and input-for-output
273 return map_device_bounds(output_bounds, ctm, input_bounds);
274 }
SkIRect * map_device_bounds(const SkIRect &input_bounds, const SkMatrix &ctm, SkIRect &output_bounds) const override

◆ Make()

static std::shared_ptr< DlImageFilter > flutter::DlBlurImageFilter::Make ( SkScalar  sigma_x,
SkScalar  sigma_y,
DlTileMode  tile_mode 
)
inlinestatic

Definition at line 231 of file dl_image_filter.h.

233 {
235 return nullptr;
236 }
238 return nullptr;
239 }
242 return std::make_shared<DlBlurImageFilter>(sigma_x, sigma_y, tile_mode);
243 }
#define SK_ScalarNearlyZero
Definition: SkScalar.h:99
SINT bool isfinite(const Vec< N, T > &v)
Definition: SkVx.h:1003

◆ map_device_bounds()

SkIRect * flutter::DlBlurImageFilter::map_device_bounds ( const SkIRect input_bounds,
const SkMatrix ctm,
SkIRect output_bounds 
) const
inlineoverridevirtual

Implements flutter::DlImageFilter.

Definition at line 262 of file dl_image_filter.h.

264 {
265 return outset_device_bounds(input_bounds, sigma_x_ * 3.0f, sigma_y_ * 3.0f,
266 ctm, output_bounds);
267 }
static SkIRect * outset_device_bounds(const SkIRect &input_bounds, SkScalar radius_x, SkScalar radius_y, const SkMatrix &ctm, SkIRect &output_bounds)

◆ map_local_bounds()

SkRect * flutter::DlBlurImageFilter::map_local_bounds ( const SkRect input_bounds,
SkRect output_bounds 
) const
inlineoverridevirtual

Implements flutter::DlImageFilter.

Definition at line 256 of file dl_image_filter.h.

257 {
258 output_bounds = input_bounds.makeOutset(sigma_x_ * 3.0f, sigma_y_ * 3.0f);
259 return &output_bounds;
260 }
SkRect makeOutset(float dx, float dy) const
Definition: SkRect.h:1002

◆ modifies_transparent_black()

bool flutter::DlBlurImageFilter::modifies_transparent_black ( ) const
inlineoverridevirtual

Implements flutter::DlImageFilter.

Definition at line 254 of file dl_image_filter.h.

254{ return false; }

◆ shared()

std::shared_ptr< DlImageFilter > flutter::DlBlurImageFilter::shared ( ) const
inlineoverridevirtual

Implements flutter::DlAttribute< DlImageFilter, DlImageFilterType >.

Definition at line 245 of file dl_image_filter.h.

245 {
246 return std::make_shared<DlBlurImageFilter>(this);
247 }

◆ sigma_x()

SkScalar flutter::DlBlurImageFilter::sigma_x ( ) const
inline

Definition at line 276 of file dl_image_filter.h.

276{ return sigma_x_; }

◆ sigma_y()

SkScalar flutter::DlBlurImageFilter::sigma_y ( ) const
inline

Definition at line 277 of file dl_image_filter.h.

277{ return sigma_y_; }

◆ size()

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

Implements flutter::DlAttribute< DlImageFilter, DlImageFilterType >.

Definition at line 250 of file dl_image_filter.h.

250{ return sizeof(*this); }

◆ tile_mode()

DlTileMode flutter::DlBlurImageFilter::tile_mode ( ) const
inline

Definition at line 278 of file dl_image_filter.h.

278{ return tile_mode_; }

◆ type()

DlImageFilterType flutter::DlBlurImageFilter::type ( ) const
inlineoverridevirtual

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