GlassPerformanceMonitor class

Monitors raster frame durations and emits a developer warning when GlassQuality.premium surfaces are active and GPU budget is exceeded.

This class is entirely static — it acts as a process-wide singleton so that multiple glass widgets share one callback and one ring buffer.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

activePremiumCount int
Number of premium glass surfaces currently mounted.
no setter
isRunning bool
Whether the monitor is currently active.
no setter
rasterBudget Duration
Raster duration budget per frame. Frames that exceed this value count toward sustainedFrameThreshold.
getter/setter pair
sustainedFrameThreshold int
Number of consecutive frames that must exceed rasterBudget before the warning fires. Reduces false positives caused by animation spikes.
getter/setter pair
warningEmitted bool
Whether the performance warning has already been emitted this session.
no setter

Static Methods

reset() → void
Resets the consecutive-frame counter and the warning latch.
simulateFrameTimings(List<FrameTiming> timings) → void
Injects synthetic FrameTiming data directly into _onFrameTimings.
start() → void
Starts the monitor.
stop() → void
Stops the monitor and detaches the frame callback.
trackPremiumMount() → void
Called by _PremiumGlassTracker when a premium glass surface mounts.
trackPremiumUnmount() → void
Called by _PremiumGlassTracker when a premium glass surface unmounts.