BindingFps class

do what @author yulun @since 2020-07-17 11:36 这个统计方式和fps_computer里的不一样,通过监听WidgetsBinding的handleBeginFrame和handleDrawFrame实现 handleBeginFrame Called by the engine to prepare the framework to produce a new frame. handleDrawFrame Called by the engine to produce a new frame. 在一秒内计算从begin->draw调用了多少次,次数就是帧数,如果帧数少于手机的渲染帧数,会认为丢失了多少帧 参考文章 https://developer.aliyun.com/article/699875

Annotations
  • @Deprecated("统计不准,只有cpu部分,即ui线程 build layout paint部分")

Properties

beginCallId int?
getter/setter pair
beginTimeCallback FrameCallback
getter/setter pair
drawTimeCallback FrameCallback?
getter/setter pair
frameId int
帧数的id
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() → dynamic
销毁
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerCallBack(FpsCallback back) → dynamic
注册回调
start() → dynamic
toString() String
A string representation of this object.
inherited
unregisterCallBack(FpsCallback back) → dynamic

Operators

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

Static Properties

instance BindingFps?
no setter

Constants

MAX_FPS → const int
1s里最高120hz了吧