glass_diagnostics library
The seams a benchmark turns, kept out of g1455.dart.
Each of these changes how the glass is drawn or exposes the host's plumbing so a run can count it — none of them is something an application declares. They are public because the research application that prices the package lives in another package and has to reach them; an application that imports this library is running an experiment.
Classes
- GlassFusedTile
- One rectangle of a fused draw, and the shapes that can colour a pixel in it.
- GlassProxyHandle
- The current proxy, as something a surface can listen to.
- GlassProxyScope
- Carries the current proxy down the tree.
- GlassRippleField
- The waves on one surface: touches in, uniforms out.
- GlassRippleWave
-
One wave as the shader takes it: two
vec4s, in the order of the uniform block. Amplitudes are signed heights in displacement px — positive magnifies — and uniforms normalises them.
Constants
- debugGlassShaderAntiAliasDefault → const bool
- What debugGlassShaderAntiAlias ships as, for a harness that has to name the arm it did not override — a host that wrote its own constant here would report the old default after the package moved, which is the trap D190 and D199 each fell into once with the split.
- kGlassGroupShaderAsset → const String
- Where the group's shader lives. See kGlassShaderAsset for why the key has a package prefix.
- kGlassRippleShaderAsset → const String
- The surface's shader with the ripple compiled in (D229).
- kGlassShaderAsset → const String
- Where the package's own shader lives.
- kMaxFusedTiles → const int
- How many rectangles a fused draw may become before it gives up and covers everything with one.
Properties
- debugGlassFoldCull ↔ bool
-
Whether the fused fold skips a shape farther than
kfrom the field so far.getter/setter pair - debugGlassFusedSplit ↔ bool
-
Whether a fused group is drawn as several rectangles instead of one.
getter/setter pair
- debugGlassFusedSplitDefault → bool
-
What debugGlassFusedSplit reads while nothing is imposed: the split.
no setter
- debugGlassShaderAntiAlias ↔ bool
-
Whether a glass draw asks the engine for antialiasing —
Paint.isAntiAliason the single surface's quad and on a group's unsplit quad.getter/setter pair
Functions
-
fusedDrawTiles(
{required List< Rect> boxes, required double reach, required double cullMargin, int maxTiles = kMaxFusedTiles}) → List<GlassFusedTile> ? - Splits a fused draw into disjoint rectangles, each carrying only the shapes that can change a pixel inside it.