25#include "impeller/entity/texture_fill.frag.h"
26#include "impeller/entity/texture_fill.vert.h"
37#define _IMPELLER_BLEND_MODE_FILTER_NAME_LIST(blend_mode) \
38 "Blend Filter " #blend_mode,
40static constexpr const char* kBlendModeFilterNames[] = {
43const std::string_view BlendModeToFilterString(
BlendMode blend_mode) {
44 return kBlendModeFilterNames[
static_cast<std::underlying_type_t<BlendMode>
>(
95template <
typename TPipeline>
100 const Rect& coverage,
102 std::optional<Color> foreground_color,
105 std::optional<Scalar> alpha) {
106 using VS =
typename TPipeline::VertexShader;
107 using FS =
typename TPipeline::FragmentShader;
113 const size_t total_inputs =
114 inputs.size() + (foreground_color.has_value() ? 1 : 0);
115 if (total_inputs < 2) {
120 inputs[0]->GetSnapshot(
"AdvancedBlend(Dst)", renderer, entity);
121 if (!dst_snapshot.has_value()) {
124 auto maybe_dst_uvs = dst_snapshot->GetCoverageUVs(coverage);
125 if (!maybe_dst_uvs.has_value()) {
128 auto dst_uvs = maybe_dst_uvs.value();
130 std::optional<Snapshot> src_snapshot;
131 std::array<Point, 4> src_uvs;
132 if (!foreground_color.has_value()) {
134 inputs[1]->GetSnapshot(
"AdvancedBlend(Src)", renderer, entity);
135 if (!src_snapshot.has_value()) {
136 if (!dst_snapshot.has_value()) {
141 auto maybe_src_uvs = src_snapshot->GetCoverageUVs(coverage);
142 if (!maybe_src_uvs.has_value()) {
143 if (!dst_snapshot.has_value()) {
148 src_uvs = maybe_src_uvs.value();
151 Rect subpass_coverage = coverage;
153 auto coverage_hint = entity.
GetContents()->GetCoverageHint();
155 if (coverage_hint.has_value()) {
156 auto maybe_subpass_coverage =
158 if (!maybe_subpass_coverage.has_value()) {
162 subpass_coverage = *maybe_subpass_coverage;
174 auto size = pass.GetRenderTargetSize();
176 std::array<typename VS::PerVertexData, 4> vertices = {
177 typename VS::PerVertexData{
Point(0, 0), dst_uvs[0], src_uvs[0]},
178 typename VS::PerVertexData{
Point(size.width, 0), dst_uvs[1],
180 typename VS::PerVertexData{
Point(0, size.height), dst_uvs[2],
182 typename VS::PerVertexData{
Point(size.width, size.height), dst_uvs[3],
191 PipelineRef pipeline = std::invoke(pipeline_proc, renderer, options);
194 pass.SetCommandLabel(BlendModeToFilterString(blend_mode));
196 pass.SetVertexBuffer(std::move(vtx_buffer));
197 pass.SetPipeline(pipeline);
199 typename FS::BlendInfo blend_info;
200 typename VS::FrameInfo frame_info;
203 renderer.
GetContext()->GetSamplerLibrary()->GetSampler(
204 dst_snapshot->sampler_descriptor);
205 FS::BindTextureSamplerDst(pass, dst_snapshot->texture, dst_sampler);
206 frame_info.dst_y_coord_scale = dst_snapshot->texture->GetYCoordScale();
207 blend_info.dst_input_alpha =
209 ? dst_snapshot->opacity
212 if (foreground_color.has_value()) {
213 blend_info.color_factor = 1;
214 blend_info.color = foreground_color.value();
218 FS::BindTextureSamplerSrc(pass, dst_snapshot->texture, dst_sampler);
221 renderer.
GetContext()->GetSamplerLibrary()->GetSampler(
222 src_snapshot->sampler_descriptor);
223 blend_info.color_factor = 0;
224 blend_info.src_input_alpha = src_snapshot->opacity;
225 FS::BindTextureSamplerSrc(pass, src_snapshot->texture, src_sampler);
226 frame_info.src_y_coord_scale = src_snapshot->texture->GetYCoordScale();
228 auto blend_uniform = data_host_buffer.EmplaceUniform(blend_info);
229 FS::BindBlendInfo(pass, blend_uniform);
231 frame_info.mvp = pass.GetOrthographicTransform() *
235 auto uniform_view = data_host_buffer.EmplaceUniform(frame_info);
236 VS::BindFrameInfo(pass, uniform_view);
238 return pass.Draw().ok();
241 std::shared_ptr<CommandBuffer> command_buffer =
243 if (!command_buffer) {
254 if (!render_target.
ok()) {
257 if (!renderer.
GetContext()->EnqueueCommandBuffer(std::move(command_buffer))) {
263 .
texture = render_target.
value().GetRenderTargetTexture(),
268 .sampler_descriptor = {},
271 : dst_snapshot->opacity) *
272 alpha.value_or(1.0)},
276std::optional<Entity> BlendFilterContents::CreateForegroundAdvancedBlend(
277 const std::shared_ptr<FilterInput>&
input,
278 const ContentContext& renderer,
279 const Entity& entity,
280 const Rect& coverage,
281 Color foreground_color,
283 std::optional<Scalar> alpha,
286 input->GetSnapshot(
"ForegroundAdvancedBlend", renderer, entity);
287 if (!dst_snapshot.has_value()) {
291 RenderProc render_proc = [foreground_color, dst_snapshot, blend_mode, alpha,
292 absorb_opacity](
const ContentContext& renderer,
293 const Entity& entity,
294 RenderPass& pass) ->
bool {
295 using VS = BlendScreenPipeline::VertexShader;
296 using FS = BlendScreenPipeline::FragmentShader;
298 auto& data_host_buffer = renderer.GetTransientsDataBuffer();
299 auto size = dst_snapshot->texture->GetSize();
301 std::array<VS::PerVertexData, 4> vertices = {
302 VS::PerVertexData{{0, 0}, {0, 0}, {0, 0}},
303 VS::PerVertexData{
Point(
size.width, 0), {1, 0}, {1, 0}},
304 VS::PerVertexData{
Point(0,
size.height), {0, 1}, {0, 1}},
305 VS::PerVertexData{
Point(
size.width,
size.height), {1, 1}, {1, 1}},
310 pass.SetCommandLabel(BlendModeToFilterString(blend_mode));
312 pass.SetVertexBuffer(std::move(vtx_buffer));
316 switch (blend_mode) {
318 pass.SetPipeline(renderer.GetBlendScreenPipeline(options));
321 pass.SetPipeline(renderer.GetBlendOverlayPipeline(options));
324 pass.SetPipeline(renderer.GetBlendDarkenPipeline(options));
327 pass.SetPipeline(renderer.GetBlendLightenPipeline(options));
330 pass.SetPipeline(renderer.GetBlendColorDodgePipeline(options));
333 pass.SetPipeline(renderer.GetBlendColorBurnPipeline(options));
336 pass.SetPipeline(renderer.GetBlendHardLightPipeline(options));
339 pass.SetPipeline(renderer.GetBlendSoftLightPipeline(options));
342 pass.SetPipeline(renderer.GetBlendDifferencePipeline(options));
345 pass.SetPipeline(renderer.GetBlendExclusionPipeline(options));
348 pass.SetPipeline(renderer.GetBlendMultiplyPipeline(options));
351 pass.SetPipeline(renderer.GetBlendHuePipeline(options));
354 pass.SetPipeline(renderer.GetBlendSaturationPipeline(options));
357 pass.SetPipeline(renderer.GetBlendColorPipeline(options));
360 pass.SetPipeline(renderer.GetBlendLuminosityPipeline(options));
366 FS::BlendInfo blend_info;
367 VS::FrameInfo frame_info;
369 raw_ptr<const Sampler> dst_sampler =
370 renderer.GetContext()->GetSamplerLibrary()->GetSampler(
371 dst_snapshot->sampler_descriptor);
372 FS::BindTextureSamplerDst(pass, dst_snapshot->texture, dst_sampler);
373 frame_info.dst_y_coord_scale = dst_snapshot->texture->GetYCoordScale();
376 entity.GetShaderClipDepth(), pass,
377 entity.GetTransform() * dst_snapshot->transform);
379 blend_info.dst_input_alpha =
381 ? dst_snapshot->opacity * alpha.value_or(1.0)
384 blend_info.color_factor = 1;
385 blend_info.color = foreground_color;
389 FS::BindTextureSamplerSrc(pass, dst_snapshot->texture, dst_sampler);
391 auto blend_uniform = data_host_buffer.EmplaceUniform(blend_info);
392 FS::BindBlendInfo(pass, blend_uniform);
394 auto uniform_view = data_host_buffer.EmplaceUniform(frame_info);
395 VS::BindFrameInfo(pass, uniform_view);
397 return pass.Draw().ok();
400 [coverage](
const Entity& entity) -> std::optional<Rect> {
401 return coverage.TransformBounds(entity.GetTransform());
407 sub_entity.SetContents(std::move(contents));
408 sub_entity.SetBlendMode(entity.GetBlendMode());
413std::optional<Entity> BlendFilterContents::CreateForegroundPorterDuffBlend(
414 const std::shared_ptr<FilterInput>&
input,
415 const ContentContext& renderer,
416 const Entity& entity,
417 const Rect& coverage,
418 Color foreground_color,
420 std::optional<Scalar> alpha,
427 input->GetSnapshot(
"ForegroundPorterDuffBlend", renderer, entity);
428 if (!dst_snapshot.has_value()) {
436 RenderProc render_proc = [foreground_color, dst_snapshot, blend_mode,
437 absorb_opacity, alpha](
438 const ContentContext& renderer,
439 const Entity& entity, RenderPass& pass) ->
bool {
440 using VS = PorterDuffBlendPipeline::VertexShader;
441 using FS = PorterDuffBlendPipeline::FragmentShader;
443 auto& data_host_buffer = renderer.GetTransientsDataBuffer();
444 auto size = dst_snapshot->texture->GetSize();
445 auto color = foreground_color.Premultiply();
447 std::array<VS::PerVertexData, 4> vertices = {
448 VS::PerVertexData{{0, 0}, {0, 0}, color},
449 VS::PerVertexData{
Point(
size.width, 0), {1, 0}, color},
450 VS::PerVertexData{
Point(0,
size.height), {0, 1}, color},
451 VS::PerVertexData{
Point(
size.width,
size.height), {1, 1}, color},
457 pass.SetCommandLabel(BlendModeToFilterString(blend_mode));
459 pass.SetVertexBuffer(std::move(vtx_buffer));
462 pass.SetPipeline(renderer.GetPorterDuffPipeline(blend_mode, options));
464 FS::FragInfo frag_info;
465 VS::FrameInfo frame_info;
468 entity.GetShaderClipDepth(), pass,
469 entity.GetTransform() * dst_snapshot->transform);
471 raw_ptr<const Sampler> dst_sampler =
472 renderer.GetContext()->GetSamplerLibrary()->GetSampler(
473 dst_snapshot->sampler_descriptor);
474 FS::BindTextureSamplerDst(pass, dst_snapshot->texture, dst_sampler);
475 frame_info.texture_sampler_y_coord_scale =
476 dst_snapshot->texture->GetYCoordScale();
478 frag_info.input_alpha_output_alpha_tmx_tmy =
480 ? dst_snapshot->opacity * alpha.value_or(1.0)
483 frag_info.use_strict_source_rect = 0.0;
485 FS::BindFragInfo(pass, data_host_buffer.EmplaceUniform(frag_info));
486 VS::BindFrameInfo(pass, data_host_buffer.EmplaceUniform(frame_info));
488 return pass.Draw().ok();
492 [coverage](
const Entity& entity) -> std::optional<Rect> {
493 return coverage.TransformBounds(entity.GetTransform());
499 sub_entity.SetContents(std::move(contents));
500 sub_entity.SetBlendMode(entity.GetBlendMode());
509 const Rect& coverage,
511 std::optional<Color> foreground_color,
513 std::optional<Scalar> alpha) {
514 using VS = TexturePipeline::VertexShader;
515 using FS = TexturePipeline::FragmentShader;
518 inputs[0]->GetSnapshot(
"PipelineBlend(Dst)", renderer, entity);
519 if (!dst_snapshot.has_value()) {
523 Rect subpass_coverage = coverage;
525 auto coverage_hint = entity.
GetContents()->GetCoverageHint();
527 if (coverage_hint.has_value()) {
528 auto maybe_subpass_coverage =
530 if (!maybe_subpass_coverage.has_value()) {
534 subpass_coverage = *maybe_subpass_coverage;
543 pass.SetCommandLabel(BlendModeToFilterString(blend_mode));
548 auto add_blend_command = [&](std::optional<Snapshot>
input) {
549 if (!
input.has_value()) {
552 auto input_coverage =
input->GetCoverage();
553 if (!input_coverage.has_value()) {
558 renderer.
GetContext()->GetSamplerLibrary()->GetSampler(
559 input->sampler_descriptor);
560 FS::BindTextureSampler(pass,
input->texture, sampler);
562 auto size =
input->texture->GetSize();
563 std::array<VS::PerVertexData, 4> vertices = {
565 VS::PerVertexData{
Point(size.width, 0),
Point(1, 0)},
566 VS::PerVertexData{
Point(0, size.height),
Point(0, 1)},
567 VS::PerVertexData{
Point(size.width, size.height),
Point(1, 1)},
569 pass.SetVertexBuffer(
572 VS::FrameInfo frame_info;
573 frame_info.mvp = pass.GetOrthographicTransform() *
576 frame_info.texture_sampler_y_coord_scale =
577 input->texture->GetYCoordScale();
579 FS::FragInfo frag_info;
584 FS::BindFragInfo(pass, data_host_buffer.EmplaceUniform(frag_info));
585 VS::BindFrameInfo(pass, data_host_buffer.EmplaceUniform(frame_info));
587 return pass.Draw().ok();
593 if (!add_blend_command(dst_snapshot)) {
599 if (inputs.size() >= 2) {
600 options.blend_mode = blend_mode;
603 for (
auto texture_i = inputs.begin() + 1; texture_i < inputs.end();
605 auto src_input = texture_i->get()->GetSnapshot(
"PipelineBlend(Src)",
607 if (!add_blend_command(src_input)) {
615 if (foreground_color.has_value()) {
617 auto contents = std::make_shared<SolidColorContents>(&geom);
618 contents->SetColor(foreground_color.value());
623 if (!foreground_entity.
Render(renderer, pass)) {
631 std::shared_ptr<CommandBuffer> command_buffer =
633 if (!command_buffer) {
646 if (!render_target.
ok()) {
649 if (!renderer.
GetContext()->EnqueueCommandBuffer(std::move(command_buffer))) {
655 .
texture = render_target.
value().GetRenderTargetTexture(),
660 .sampler_descriptor = {},
663 : dst_snapshot->opacity) *
664 alpha.value_or(1.0)},
668std::optional<Entity> BlendFilterContents::CreateFramebufferAdvancedBlend(
670 const ContentContext& renderer,
671 const Entity& entity,
672 const Rect& coverage,
673 std::optional<Color> foreground_color,
675 std::optional<Scalar> alpha,
679 (inputs.size() == 1u && foreground_color.has_value()));
682 inputs[0]->GetSnapshot(
"ForegroundAdvancedBlend", renderer, entity);
683 if (!dst_snapshot.has_value()) {
687 std::shared_ptr<Texture> foreground_texture;
694 HostBuffer& data_host_buffer = renderer.GetTransientsDataBuffer();
697 using FS = TextureFillFragmentShader;
698 using VS = TextureFillVertexShader;
700 pass.SetCommandLabel(
"Framebuffer Advanced Blend");
703 pass.SetPipeline(renderer.GetTexturePipeline(pipeline_options));
705 VS::FrameInfo frame_info;
707 frame_info.texture_sampler_y_coord_scale =
708 dst_snapshot->texture->GetYCoordScale();
710 FS::FragInfo frag_info;
711 frag_info.alpha = 1.0;
713 std::array<VS::PerVertexData, 4> vertices = {
714 VS::PerVertexData{{0, 0}, {0, 0}},
715 VS::PerVertexData{
Point(1, 0), {1, 0}},
716 VS::PerVertexData{
Point(0, 1), {0, 1}},
717 VS::PerVertexData{
Point(1, 1), {1, 1}},
719 pass.SetVertexBuffer(
722 VS::BindFrameInfo(pass, data_host_buffer.EmplaceUniform(frame_info));
723 FS::BindFragInfo(pass, data_host_buffer.EmplaceUniform(frag_info));
724 FS::BindTextureSampler(
725 pass, dst_snapshot->texture,
726 renderer.GetContext()->GetSamplerLibrary()->GetSampler({}));
728 if (!pass.Draw().ok()) {
734 using VS = FramebufferBlendScreenPipeline::VertexShader;
735 using FS = FramebufferBlendScreenPipeline::FragmentShader;
739 std::shared_ptr<Texture> src_texture;
740 SamplerDescriptor src_sampler_descriptor = SamplerDescriptor{};
741 if (foreground_color.has_value()) {
742 src_texture = foreground_texture;
745 inputs[0]->GetSnapshot(
"ForegroundAdvancedBlend", renderer, entity);
746 if (!src_snapshot.has_value()) {
752 src_texture = src_snapshot->texture;
753 src_sampler_descriptor = src_snapshot->sampler_descriptor;
756 std::array<VS::PerVertexData, 4> vertices = {
767 pass.SetCommandLabel(
"Framebuffer Advanced Blend Filter");
768 pass.SetVertexBuffer(
771 switch (blend_mode) {
773 pass.SetPipeline(renderer.GetFramebufferBlendScreenPipeline(options));
777 renderer.GetFramebufferBlendOverlayPipeline(options));
780 pass.SetPipeline(renderer.GetFramebufferBlendDarkenPipeline(options));
784 renderer.GetFramebufferBlendLightenPipeline(options));
788 renderer.GetFramebufferBlendColorDodgePipeline(options));
792 renderer.GetFramebufferBlendColorBurnPipeline(options));
796 renderer.GetFramebufferBlendHardLightPipeline(options));
800 renderer.GetFramebufferBlendSoftLightPipeline(options));
804 renderer.GetFramebufferBlendDifferencePipeline(options));
808 renderer.GetFramebufferBlendExclusionPipeline(options));
812 renderer.GetFramebufferBlendMultiplyPipeline(options));
815 pass.SetPipeline(renderer.GetFramebufferBlendHuePipeline(options));
819 renderer.GetFramebufferBlendSaturationPipeline(options));
822 pass.SetPipeline(renderer.GetFramebufferBlendColorPipeline(options));
826 renderer.GetFramebufferBlendLuminosityPipeline(options));
832 VS::FrameInfo frame_info;
833 FS::FragInfo frag_info;
835 raw_ptr<const Sampler> src_sampler =
836 renderer.GetContext()->GetSamplerLibrary()->GetSampler(
837 src_sampler_descriptor);
838 FS::BindTextureSamplerSrc(pass, src_texture, src_sampler);
841 frame_info.src_y_coord_scale = src_texture->GetYCoordScale();
842 VS::BindFrameInfo(pass, data_host_buffer.EmplaceUniform(frame_info));
844 frag_info.src_input_alpha = 1.0;
845 frag_info.dst_input_alpha =
847 ? dst_snapshot->opacity
849 FS::BindFragInfo(pass, data_host_buffer.EmplaceUniform(frag_info));
851 return pass.Draw().ok();
855 std::shared_ptr<CommandBuffer> cmd_buffer =
856 renderer.GetContext()->CreateCommandBuffer();
859 if (foreground_color.has_value()) {
860 TextureDescriptor desc;
865 renderer.GetContext()->GetResourceAllocator()->CreateTexture(desc);
866 if (!foreground_texture) {
869 std::shared_ptr<BlitPass> blit_pass = cmd_buffer->CreateBlitPass();
870 auto buffer_view = renderer.GetTransientsDataBuffer().Emplace(
871 foreground_color->Premultiply().ToR8G8B8A8(), 4);
873 blit_pass->AddCopy(std::move(buffer_view), foreground_texture);
874 if (!blit_pass->EncodeCommands()) {
880 renderer.MakeSubpass(
"FramebufferBlend",
881 dst_snapshot->texture->GetSize(),
888 if (!render_target.
ok()) {
891 if (!renderer.GetContext()->EnqueueCommandBuffer(std::move(cmd_buffer))) {
897 .texture = render_target.
value().GetRenderTargetTexture(),
902 .sampler_descriptor = {},
905 : dst_snapshot->opacity) *
906 alpha.value_or(1.0)},
907 entity.GetBlendMode());
910#define BLEND_CASE(mode) \
911 case BlendMode::k##mode: \
912 advanced_blend_proc_ = \
913 [](const FilterInput::Vector& inputs, const ContentContext& renderer, \
914 const Entity& entity, const Rect& coverage, BlendMode blend_mode, \
915 std::optional<Color> fg_color, \
916 ColorFilterContents::AbsorbOpacity absorb_opacity, \
917 std::optional<Scalar> alpha) { \
918 PipelineProc p = &ContentContext::GetBlend##mode##Pipeline; \
919 return AdvancedBlend<Blend##mode##Pipeline>( \
920 inputs, renderer, entity, coverage, blend_mode, fg_color, \
921 absorb_opacity, p, alpha); \
927 VALIDATION_LOG <<
"Invalid blend mode " <<
static_cast<int>(blend_mode)
928 <<
" assigned to BlendFilterContents.";
931 blend_mode_ = blend_mode;
934 switch (blend_mode) {
957 foreground_color_ = color;
960std::optional<Entity> BlendFilterContents::RenderFilter(
964 const Matrix& effect_transform,
965 const Rect& coverage,
966 const std::optional<Rect>& coverage_hint)
const {
967 if (inputs.empty()) {
971 if (inputs.size() == 1 && !foreground_color_.has_value()) {
978 if (inputs.size() == 1 && foreground_color_.has_value() &&
980 return CreateForegroundPorterDuffBlend(
981 inputs[0], renderer, entity, coverage, foreground_color_.value(),
984 return PipelineBlend(inputs, renderer, entity, coverage, blend_mode_,
990 return CreateFramebufferAdvancedBlend(inputs, renderer, entity, coverage,
991 foreground_color_, blend_mode_,
994 if (inputs.size() == 1 && foreground_color_.has_value() &&
996 return CreateForegroundAdvancedBlend(
997 inputs[0], renderer, entity, coverage, foreground_color_.value(),
1000 return advanced_blend_proc_(inputs, renderer, entity, coverage, blend_mode_,
static std::shared_ptr< Contents > Make(RenderProc render_proc, CoverageProc coverage_proc)
~BlendFilterContents() override
void SetBlendMode(BlendMode blend_mode)
void SetForegroundColor(std::optional< Color > color)
Sets a source color which is blended after all of the inputs have been blended.
virtual bool SupportsFramebufferFetch() const =0
Whether the context backend is able to support pipelines with shaders that read from the framebuffer ...
std::optional< Scalar > GetAlpha() const
AbsorbOpacity GetAbsorbOpacity() const
HostBuffer & GetTransientsDataBuffer() const
Retrieve the current host buffer for transient storage of other non-index data.
fml::StatusOr< RenderTarget > MakeSubpass(std::string_view label, ISize texture_size, const std::shared_ptr< CommandBuffer > &command_buffer, const SubpassCallback &subpass_callback, bool msaa_enabled=true, bool depth_stencil_enabled=false, int32_t mip_count=1) const
Creates a new texture of size texture_size and calls subpass_callback with a RenderPass for drawing t...
const Capabilities & GetDeviceCapabilities() const
PipelineRef GetTexturePipeline(ContentContextOptions opts) const
std::function< bool(const ContentContext &, RenderPass &)> SubpassCallback
std::shared_ptr< Context > GetContext() const
std::function< std::optional< Rect >(const Entity &entity)> CoverageProc
std::function< bool(const ContentContext &renderer, const Entity &entity, RenderPass &pass)> RenderProc
const std::shared_ptr< Contents > & GetContents() const
Matrix GetShaderTransform(const RenderPass &pass) const
BlendMode GetBlendMode() const
void SetContents(std::shared_ptr< Contents > contents)
void SetBlendMode(BlendMode blend_mode)
static constexpr BlendMode kLastAdvancedBlendMode
bool Render(const ContentContext &renderer, RenderPass &parent_pass) const
static constexpr BlendMode kLastPipelineBlendMode
static Entity FromSnapshot(const Snapshot &snapshot, BlendMode blend_mode=BlendMode::kSrcOver)
Create an entity that can be used to render a given snapshot.
Render passes encode render commands directed as one specific render target into an underlying comman...
#define IMPELLER_FOR_EACH_BLEND_MODE(V)
FlutterDesktopBinaryReply callback
#define FML_UNREACHABLE()
#define FML_DCHECK(condition)
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static constexpr Scalar Saturation(Vector3 color)
raw_ptr< Pipeline< PipelineDescriptor > > PipelineRef
A raw ptr to a pipeline object.
LinePipeline::FragmentShader FS
VertexBuffer CreateVertexBuffer(std::array< VertexType, size > input, HostBuffer &data_host_buffer)
Create an index-less vertex buffer from a fixed size array.
static std::optional< Entity > PipelineBlend(const FilterInput::Vector &inputs, const ContentContext &renderer, const Entity &entity, const Rect &coverage, BlendMode blend_mode, std::optional< Color > foreground_color, ColorFilterContents::AbsorbOpacity absorb_opacity, std::optional< Scalar > alpha)
std::optional< BlendMode > InvertPorterDuffBlend(BlendMode blend_mode)
LinePipeline::VertexShader VS
PipelineRef(ContentContext::*)(ContentContextOptions) const PipelineProc
static std::optional< Entity > AdvancedBlend(const FilterInput::Vector &inputs, const ContentContext &renderer, const Entity &entity, const Rect &coverage, BlendMode blend_mode, std::optional< Color > foreground_color, ColorFilterContents::AbsorbOpacity absorb_opacity, PipelineProc pipeline_proc, std::optional< Scalar > alpha)
ContentContextOptions OptionsFromPassAndEntity(const RenderPass &pass, const Entity &entity)
ContentContextOptions OptionsFromPass(const RenderPass &pass)
static constexpr Scalar Luminosity(Vector3 color)
A 4x4 matrix using column-major storage.
static constexpr Matrix MakeOrthographic(TSize< T > size)
static constexpr Matrix MakeTranslation(const Vector3 &t)
Represents a texture and its intended draw transform/sampler configuration.
std::shared_ptr< Texture > texture
constexpr std::optional< TRect > Intersection(const TRect &o) const
constexpr TSize< Type > GetSize() const
Returns the size of the rectangle which may be negative in either width or height and may have been c...
static constexpr TRect MakeSize(const TSize< U > &size)
constexpr TPoint< Type > GetOrigin() const
Returns the upper left corner of the rectangle as specified by the left/top or x/y values when it was...