5 #ifndef FLUTTER_IMPELLER_DISPLAY_LIST_PAINT_H_
6 #define FLUTTER_IMPELLER_DISPLAY_LIST_PAINT_H_
10 #include "display_list/effects/dl_color_filter.h"
11 #include "display_list/effects/dl_color_sources.h"
12 #include "display_list/effects/dl_image_filter.h"
30 const Matrix& effect_transform,
35 const Matrix& effect_transform)>;
60 std::shared_ptr<ColorSourceContents> color_source_contents,
66 std::shared_ptr<TextureContents> texture_contents,
92 std::shared_ptr<Contents>
WithFilters(std::shared_ptr<Contents> input)
const;
103 std::shared_ptr<Contents> input,
111 std::shared_ptr<Contents>
WithMaskBlur(std::shared_ptr<Contents> input,
117 const Matrix& effect_transform,
135 static void ConvertStops(
const flutter::DlGradientColorSourceBase* gradient,
136 std::vector<Color>& colors,
137 std::vector<float>& stops);
140 std::shared_ptr<Contents> WithColorFilter(
141 std::shared_ptr<Contents> input,
static constexpr Color Black()
A 4x4 matrix using column-major storage.
FilterContents::BlurStyle style
std::shared_ptr< FilterContents > CreateMaskBlur(std::shared_ptr< ColorSourceContents > color_source_contents, const flutter::DlColorFilter *color_filter, bool invert_colors, FillRectGeometry *rect_geom) const
std::shared_ptr< Contents > WithFilters(std::shared_ptr< Contents > input) const
Wrap this paint's configured filters to the given contents.
const flutter::DlColorFilter * color_filter
const flutter::DlColorSource * color_source
std::function< std::shared_ptr< FilterContents >(FilterInput::Ref, const Matrix &effect_transform, Entity::RenderingMode rendering_mode)> ImageFilterProc
static void ConvertStops(const flutter::DlGradientColorSourceBase *gradient, std::vector< Color > &colors, std::vector< float > &stops)
Convert display list colors + stops into impeller colors and stops, taking care to ensure that the st...
const flutter::DlImageFilter * image_filter
std::function< std::shared_ptr< ColorSourceContents >()> ColorSourceProc
std::shared_ptr< Contents > WithMaskBlur(std::shared_ptr< Contents > input, bool is_solid_color, const Matrix &ctm) const
static bool CanApplyOpacityPeephole(const Paint &paint)
Whether or not a save layer with the provided paint can perform the opacity peephole optimization.
std::optional< MaskBlurDescriptor > mask_blur_descriptor
std::function< std::shared_ptr< FilterContents >(FilterInput::Ref, bool is_solid_color, const Matrix &effect_transform)> MaskFilterProc
std::shared_ptr< Contents > WithFiltersForSubpassTarget(std::shared_ptr< Contents > input, const Matrix &effect_transform=Matrix()) const
Wrap this paint's configured filters to the given contents of subpass target.
std::shared_ptr< FilterContents > WithImageFilter(const FilterInput::Variant &input, const Matrix &effect_transform, Entity::RenderingMode rendering_mode) const
std::shared_ptr< ColorSourceContents > CreateContents() const
bool HasColorFilter() const
Whether this paint has a color filter that can apply opacity.
In filters that use Gaussian distributions, "sigma" is a size of one standard deviation in terms of t...
A structure to store all of the parameters related to stroking a path or basic geometry object.