#include <paint.h>
Classes | |
| struct | MaskBlurDescriptor |
Public Types | |
| enum | Style { Style::kFill, Style::kStroke } |
| using | ImageFilterProc = std::function< std::shared_ptr< FilterContents >(FilterInput::Ref, const Matrix &effect_transform, Entity::RenderingMode rendering_mode)> |
| using | MaskFilterProc = std::function< std::shared_ptr< FilterContents >(FilterInput::Ref, bool is_solid_color, const Matrix &effect_transform)> |
| using | ColorSourceProc = std::function< std::shared_ptr< ColorSourceContents >()> |
Public Member Functions | |
| std::shared_ptr< ColorFilter > | GetColorFilter () const |
| std::shared_ptr< Contents > | WithFilters (std::shared_ptr< Contents > input) const |
| Wrap this paint's configured filters to the given contents. More... | |
| 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. More... | |
| std::shared_ptr< Contents > | CreateContentsForGeometry (const std::shared_ptr< Geometry > &geometry) const |
| bool | HasColorFilter () const |
| Whether this paint has a color filter that can apply opacity. More... | |
| std::shared_ptr< Contents > | WithMaskBlur (std::shared_ptr< Contents > input, bool is_solid_color, const Matrix &ctm) const |
| std::shared_ptr< FilterContents > | WithImageFilter (const FilterInput::Variant &input, const Matrix &effect_transform, Entity::RenderingMode rendering_mode) const |
Static Public Member Functions | |
| static bool | CanApplyOpacityPeephole (const Paint &paint) |
| Whether or not a save layer with the provided paint can perform the opacity peephole optimization. More... | |
Public Attributes | |
| Color | color = Color::Black() |
| ColorSource | color_source |
| Scalar | stroke_width = 0.0 |
| Cap | stroke_cap = Cap::kButt |
| Join | stroke_join = Join::kMiter |
| Scalar | stroke_miter = 4.0 |
| Style | style = Style::kFill |
| BlendMode | blend_mode = BlendMode::kSourceOver |
| bool | invert_colors = false |
| std::shared_ptr< ImageFilter > | image_filter |
| std::shared_ptr< ColorFilter > | color_filter |
| std::optional< MaskBlurDescriptor > | mask_blur_descriptor |
| using impeller::Paint::ColorSourceProc = std::function<std::shared_ptr<ColorSourceContents>()> |
| using impeller::Paint::ImageFilterProc = std::function<std::shared_ptr<FilterContents>( FilterInput::Ref, const Matrix& effect_transform, Entity::RenderingMode rendering_mode)> |
| using impeller::Paint::MaskFilterProc = std::function<std::shared_ptr<FilterContents>( FilterInput::Ref, bool is_solid_color, const Matrix& effect_transform)> |
|
strong |
|
inlinestatic |
Whether or not a save layer with the provided paint can perform the opacity peephole optimization.
Definition at line 36 of file paint.h.
References impeller::kSourceOver, and paint.
Referenced by impeller::ExperimentalCanvas::SaveLayer().
| std::shared_ptr< Contents > impeller::Paint::CreateContentsForGeometry | ( | const std::shared_ptr< Geometry > & | geometry | ) | const |
Definition at line 30 of file paint.cc.
References color_filter, color_source, GetColorFilter(), impeller::ColorSource::GetContents(), and mask_blur_descriptor.
| std::shared_ptr< ColorFilter > impeller::Paint::GetColorFilter | ( | ) | const |
Definition at line 222 of file paint.cc.
References color_filter, invert_colors, impeller::kColorInversion, impeller::ColorFilter::MakeComposed(), and impeller::ColorFilter::MakeMatrix().
Referenced by CreateContentsForGeometry().
| bool impeller::Paint::HasColorFilter | ( | ) | const |
Whether this paint has a color filter that can apply opacity.
Definition at line 236 of file paint.cc.
References color_filter, and invert_colors.
Wrap this paint's configured filters to the given contents.
| [in] | input | The contents to wrap with paint's filters. |
Definition at line 56 of file paint.cc.
References image_filter, impeller::Entity::kDirect, impeller::ColorFilterContents::kYes, and WithImageFilter().
| std::shared_ptr< Contents > impeller::Paint::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.
| [in] | input | The contents of subpass target to wrap with paint's filters. |
Definition at line 67 of file paint.cc.
References image_filter, impeller::Entity::kSubpassPrependSnapshotTransform, impeller::ColorFilterContents::kYes, and WithImageFilter().
Referenced by impeller::PaintPassDelegate::CreateContentsForSubpassTarget().
| std::shared_ptr< FilterContents > impeller::Paint::WithImageFilter | ( | const FilterInput::Variant & | input, |
| const Matrix & | effect_transform, | ||
| Entity::RenderingMode | rendering_mode | ||
| ) | const |
Definition at line 90 of file paint.cc.
References image_filter, and impeller::FilterInput::Make().
Referenced by WithFilters(), WithFiltersForSubpassTarget(), and impeller::PaintPassDelegate::WithImageFilter().
| std::shared_ptr< Contents > impeller::Paint::WithMaskBlur | ( | std::shared_ptr< Contents > | input, |
| bool | is_solid_color, | ||
| const Matrix & | ctm | ||
| ) | const |
Definition at line 80 of file paint.cc.
References impeller::FilterInput::Make(), and mask_blur_descriptor.
| BlendMode impeller::Paint::blend_mode = BlendMode::kSourceOver |
Definition at line 76 of file paint.h.
Referenced by impeller::PaintPassDelegate::CanElide(), impeller::ExperimentalCanvas::Restore(), impeller::DlDispatcherBase::setBlendMode(), and impeller::testing::TEST_P().
| Color impeller::Paint::color = Color::Black() |
Definition at line 68 of file paint.h.
Referenced by impeller::testing::BlendModeTest(), impeller::PaintPassDelegate::CreateContentsForSubpassTarget(), impeller::DlDispatcherBase::drawDisplayList(), impeller::TextFrameDispatcher::drawTextFrame(), impeller::ExperimentalCanvas::SaveLayer(), impeller::Canvas::SaveLayer(), impeller::DlDispatcherBase::setColor(), impeller::TextFrameDispatcher::setColor(), and impeller::testing::TEST_P().
| std::shared_ptr<ColorFilter> impeller::Paint::color_filter |
Definition at line 80 of file paint.h.
Referenced by CreateContentsForGeometry(), impeller::Paint::MaskBlurDescriptor::CreateMaskBlur(), GetColorFilter(), HasColorFilter(), and impeller::DlDispatcherBase::setColorFilter().
| ColorSource impeller::Paint::color_source |
Definition at line 69 of file paint.h.
Referenced by CreateContentsForGeometry(), impeller::DlDispatcherBase::setColorSource(), and impeller::testing::TEST_P().
| std::shared_ptr<ImageFilter> impeller::Paint::image_filter |
Definition at line 79 of file paint.h.
Referenced by impeller::DlDispatcherBase::setImageFilter(), impeller::testing::TEST(), WithFilters(), WithFiltersForSubpassTarget(), and WithImageFilter().
| bool impeller::Paint::invert_colors = false |
Definition at line 77 of file paint.h.
Referenced by GetColorFilter(), HasColorFilter(), and impeller::DlDispatcherBase::setInvertColors().
| std::optional<MaskBlurDescriptor> impeller::Paint::mask_blur_descriptor |
Definition at line 81 of file paint.h.
Referenced by CreateContentsForGeometry(), impeller::DlDispatcherBase::setMaskFilter(), impeller::testing::TEST_P(), and WithMaskBlur().
| Cap impeller::Paint::stroke_cap = Cap::kButt |
Definition at line 72 of file paint.h.
Referenced by impeller::TextFrameDispatcher::drawTextFrame(), impeller::DlDispatcherBase::setStrokeCap(), and impeller::TextFrameDispatcher::setStrokeCap().
| Join impeller::Paint::stroke_join = Join::kMiter |
Definition at line 73 of file paint.h.
Referenced by impeller::TextFrameDispatcher::drawTextFrame(), impeller::DlDispatcherBase::setStrokeJoin(), and impeller::TextFrameDispatcher::setStrokeJoin().
| Scalar impeller::Paint::stroke_miter = 4.0 |
Definition at line 74 of file paint.h.
Referenced by impeller::TextFrameDispatcher::drawTextFrame(), impeller::DlDispatcherBase::setStrokeMiter(), and impeller::TextFrameDispatcher::setStrokeMiter().
| Scalar impeller::Paint::stroke_width = 0.0 |
Definition at line 71 of file paint.h.
Referenced by impeller::TextFrameDispatcher::drawTextFrame(), impeller::DlDispatcherBase::setStrokeWidth(), and impeller::TextFrameDispatcher::setStrokeWidth().
| Style impeller::Paint::style = Style::kFill |