debugGlassShaderAntiAlias top-level property Diagnostics

bool debugGlassShaderAntiAlias
getter/setter pair

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. 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. 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. The false only reaches the engine through primeAliasedDraw. A global for the reason debugGlassFusedSplit is one; set it before the tree mounts, and read which setting ran off RenderGlassSurface.opticsDrawsAliased and RenderGlassGroup.fusedDrawsAliased.

Implementation

bool debugGlassShaderAntiAlias = debugGlassShaderAntiAliasDefault;