debugGlassShaderAntiAlias top-level property
Whether a glass draw asks the engine for antialiasing — Paint.isAntiAlias
on the single surface's quad and on a group's unsplit quad.
Not an antialiasing switch, and that is the point of the arm. The
shader writes its own coverage off the shape's distance, and it is zero half
a device pixel outside the shape, so both quads are drawn a device pixel
larger than any pixel that coverage can reach (the group's always was, by
its blend radius): no edge pixel is decided by the rasterizer, on any
backend, with the flag either way. What the flag does on Impeller is choose
the draw: isAntiAlias is read only by IsCompatibleWithSDFRendering
(canvas.cc:2635), and a compatible paint with a colour source — a
FragmentShader is one — is drawn as a white SDF mask and the shader
separately, joined by MakeBlend(kSrcIn) through offscreen snapshots
(canvas.cc:2185-2209, flutter/flutter#192994). SDFs are always on for
macOS and on by default on Windows and Linux, opt-in on iOS, absent on
Android.
False, because the SDF draw is both dearer and wrong (D200). On an M3
Max twelve surfaces cost 1.355 ms of GPU a frame through it and 0.522 ms
directly, and the offscreen shifts the whole interior on a fractional
layout: the identity finish differs from the bare backdrop by up to 136
code values through the SDF draw and by nothing directly. D191 and D199
saw no difference because the false never arrived — see
primeAliasedDraw — so their "the flag changes nothing" compared the SDF
draw with itself. A global for the reason debugGlassFusedSplit is one;
set it before the tree mounts, and read which arm ran off
RenderGlassSurface.opticsDrawsAliased and
RenderGlassGroup.fusedDrawsAliased, never off the label.
Implementation
bool debugGlassShaderAntiAlias = debugGlassShaderAntiAliasDefault;