Diagnostics topic
package:g1455/glass_diagnostics.dart: the seams a benchmark or a test turns.
An application has no reason to import it.
- The host's published proxy and its counters, GlassProxyHandle through
GlassProxyScope:
snapshotscounts the captures,readBacksthe backdrop readings,throttledthe holds thermal pressure bought. - The switches the measured arms were priced with: the tile split of a group's draw (debugGlassFusedSplit) and the shader's anti-alias flag (debugGlassShaderAntiAlias).
- Models a test drives without a frame: GlassRippleField, GlassBackdropReadings.
final GlassProxyHandle? handle = GlassProxyScope.maybeOf(context);
final int before = handle?.snapshots ?? 0;
// … pump a frame …
final bool captured = (handle?.snapshots ?? 0) > before;
Libraries
- glass_diagnostics Diagnostics
- The seams a benchmark turns, kept out of
g1455.dart.
Classes
- GlassBackdropReadings Diagnostics
- The verdicts of every glass under one host, as something a component can listen to.
- GlassBackdropVerdict Diagnostics
- One glass's verdict over time: the readings it is offered, and the one it keeps.
- GlassFusedTile Diagnostics
- One rectangle of a fused draw, and the shapes that can colour a pixel in it.
- GlassProxyHandle Diagnostics
- The current proxy, as something a surface can listen to.
- GlassProxyScope Diagnostics
- Carries the current proxy down the tree.
- GlassRippleField Diagnostics
- The waves on one surface: touches in, uniforms out.
- GlassRippleWave Diagnostics
-
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 Diagnostics
- 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 Diagnostics
- Where the group's shader lives. See kGlassShaderAsset for why the key has a package prefix.
- kGlassRippleShaderAsset → const String Diagnostics
- The surface's shader with the ripple compiled in (D229).
- kGlassShaderAsset → const String Diagnostics
- Where the package's own shader lives.
- kMaxFusedTiles → const int Diagnostics
- How many rectangles a fused draw may become before it gives up and covers everything with one.
Properties
- debugGlassFoldCull ↔ bool Diagnostics
-
Whether the fused fold skips a shape farther than
kfrom the field so far.getter/setter pair - debugGlassFusedSplit ↔ bool Diagnostics
-
Whether a fused group is drawn as several rectangles instead of one.
getter/setter pair
- debugGlassFusedSplitDefault → bool Diagnostics
-
What debugGlassFusedSplit reads while nothing is imposed: the split.
no setter
- debugGlassShaderAntiAlias ↔ bool Diagnostics
-
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 -
debugGlassShaderLoader
↔ Future<
FragmentProgram> Function(String asset) Diagnostics -
How every host, ripple and GlassHost.precache loads a shader:
ui.FragmentProgram.fromAsset, which a widget test cannot make fail — the
engine reads the asset itself, past the asset channel's mock.
getter/setter pair
Functions
-
fusedDrawTiles(
{required List< DiagnosticsRect> 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.