36 const Entity& entity)
const {
41 const std::shared_ptr<Geometry>& geometry =
GetGeometry();
42 if (geometry ==
nullptr) {
53 auto& host_buffer =
renderer.GetTransientsBuffer();
55 VS::FrameInfo frame_info;
56 FS::FragInfo frag_info;
64 return ColorSourceContents::DrawGeometry<VS>(
65 renderer, entity, pass, pipeline_callback, frame_info,
67 FS::BindFragInfo(pass, host_buffer.EmplaceUniform(frag_info));
75 auto contents = std::make_unique<SolidColorContents>();
77 contents->SetColor(
color);
83 ISize target_size)
const {
87 : std::optional<Color>();
92 color_ = color_filter_proc(color_);
Scalar GetOpacityFactor() const
Get the opacity factor for this color source.
std::function< std::shared_ptr< Pipeline< PipelineDescriptor > >(ContentContextOptions)> PipelineBuilderCallback
const std::shared_ptr< Geometry > & GetGeometry() const
Get the geometry that this contents will use to render.
std::function< Color(Color)> ColorFilterProc
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
static std::shared_ptr< Geometry > MakeFillPath(const Path &path, std::optional< Rect > inner_rect=std::nullopt)
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
Render passes encode render commands directed as one specific render target into an underlying comman...
virtual void SetCommandLabel(std::string_view label)
The debugging label to use for the command.
VertexShader_ VertexShader
FragmentShader_ FragmentShader
bool IsOpaque() const override
Whether this Contents only emits opaque source colors from the fragment stage. This value does not ac...
~SolidColorContents() override
bool IsSolidColor() const override
void SetColor(Color color)
bool ApplyColorFilter(const ColorFilterProc &color_filter_proc) override
If possible, applies a color filter to this contents inputs on the CPU.
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
static std::unique_ptr< SolidColorContents > Make(const Path &path, Color color)
std::optional< Color > AsBackgroundColor(const Entity &entity, ISize target_size) const override
Returns a color if this Contents will flood the given target_size with a color. This output color is ...
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the area of the render pass that will be affected when this contents is rendered.
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
constexpr bool IsOpaque() const
constexpr Color WithAlpha(Scalar new_alpha) const
constexpr Color Premultiply() const
static constexpr TRect MakeSize(const TSize< U > &size)