33 {
34 if (!
renderer.GetDeviceCapabilities().SupportsFramebufferFetch()) {
35 return false;
36 }
37
40
41 auto& host_buffer =
renderer.GetTransientsBuffer();
42
43 auto src_snapshot = child_contents_->RenderToSnapshot(
44 renderer,
45 entity,
47 std::nullopt,
48 true,
49 1,
50 "FramebufferBlendContents Snapshot");
51
52 if (!src_snapshot.has_value()) {
53 return true;
54 }
55 auto coverage = src_snapshot->GetCoverage();
57 return true;
58 }
60
61 auto size = src_coverage.GetSize();
62 VertexBufferBuilder<VS::PerVertexData> vtx_builder;
63 vtx_builder.AddVertices({
68 });
69
73
74 pass.SetCommandLabel("Framebuffer Advanced Blend Filter");
75 pass.SetVertexBuffer(vtx_builder.CreateVertexBuffer(host_buffer));
76
77 switch (blend_mode_) {
80 break;
83 break;
86 break;
89 break;
91 pass.SetPipeline(
renderer.GetFramebufferBlendColorDodgePipeline(
options));
92 break;
94 pass.SetPipeline(
renderer.GetFramebufferBlendColorBurnPipeline(
options));
95 break;
97 pass.SetPipeline(
renderer.GetFramebufferBlendHardLightPipeline(
options));
98 break;
100 pass.SetPipeline(
renderer.GetFramebufferBlendSoftLightPipeline(
options));
101 break;
103 pass.SetPipeline(
renderer.GetFramebufferBlendDifferencePipeline(
options));
104 break;
106 pass.SetPipeline(
renderer.GetFramebufferBlendExclusionPipeline(
options));
107 break;
109 pass.SetPipeline(
renderer.GetFramebufferBlendMultiplyPipeline(
options));
110 break;
113 break;
115 pass.SetPipeline(
renderer.GetFramebufferBlendSaturationPipeline(
options));
116 break;
119 break;
121 pass.SetPipeline(
renderer.GetFramebufferBlendLuminosityPipeline(
options));
122 break;
123 default:
124 return false;
125 }
126
127 VS::FrameInfo frame_info;
128 FS::FragInfo frag_info;
129
130 auto src_sampler_descriptor = src_snapshot->sampler_descriptor;
131 if (
renderer.GetDeviceCapabilities().SupportsDecalSamplerAddressMode()) {
134 }
135 const std::unique_ptr<const Sampler>& src_sampler =
136 renderer.GetContext()->GetSamplerLibrary()->GetSampler(
137 src_sampler_descriptor);
138 FS::BindTextureSamplerSrc(pass, src_snapshot->texture, src_sampler);
139
141 src_snapshot->transform);
142 frame_info.src_y_coord_scale = src_snapshot->texture->GetYCoordScale();
143 VS::BindFrameInfo(pass, host_buffer.EmplaceUniform(frame_info));
144
145 frag_info.src_input_alpha = src_snapshot->opacity;
146 FS::BindFragInfo(pass, host_buffer.EmplaceUniform(frag_info));
147
148 return pass.Draw().ok();
149}
Matrix GetShaderTransform(const RenderPass &pass) const
Get the vertex shader transform used for drawing this Entity.
VertexShader_ VertexShader
FragmentShader_ FragmentShader
it will be possible to load the file into Perfetto s trace viewer 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
@ kDecal
decal sampling mode is only supported on devices that pass the Capabilities.SupportsDecalSamplerAddre...
ContentContextOptions OptionsFromPass(const RenderPass &pass)
static constexpr TRect MakeSize(const TSize< U > &size)