Open Zolliner opened 10 months ago
游戏的fps我试过华为基本都可以的,只能用surfaceview,不能用gfxinfo。不要晒这么多图,直接把终端日志给我看就行。dumpsys SurfaceFlinger --list发出来我看看
电脑端运行 adb shell dumpsys SurfaceFlinger --list
,结果如下,由于内容比较长,因此折叠了,点击即可展开
是没启动王者荣耀app吗?启动一下,过滤包名我看看,我想看surfaceview。然后你在代码看看get_surfaceview()这个方法返回值是什么。这里最关键就是看surfaceview拿的对不对,不同手机规则不太一样
内容如下:
5f87669 ActivityRecordInputSink com.tencent.tmgp.sgame/.SGameActivity#12522
ActivityRecord{d1498ee u0 com.tencent.tmgp.sgame/.SGameActivity} t7916}#12508
f951108 com.tencent.tmgp.sgame/com.tencent.tmgp.sgame.SGameActivity#12531
Background for SurfaceView[com.tencent.tmgp.sgame/com.tencent.tmgp.sgame.SGameActivity]#12550
SurfaceView[com.tencent.tmgp.sgame/com.tencent.tmgp.sgame.SGameActivity]#12548
SurfaceView[com.tencent.tmgp.sgame/com.tencent.tmgp.sgame.SGameActivity](BLAST)#12549
com.tencent.tmgp.sgame/com.tencent.tmgp.sgame.SGameActivity#12538
Bounds for - com.tencent.tmgp.sgame/com.tencent.tmgp.sgame.SGameActivity#12547
get_surfaceview()返回值是 'SurfaceView[com.tencent.tmgp.sgame/com.tencent.tmgp.sgame.SGameActivity]#12548'
界面给的几个选项是
看上去是对的,没有你的手机调试,没法搞。你自己用get_surfaceview_activity替换一下get_surfaceview这个方法看看能不能收到数据。不行的话我也解决不了了。我这边是按照华为来适配的
红米K50Ultra,MIUI14.0.11,安卓13 使用
python -m solox
打开界面评测或者使用代码评测,都无法获取到FPS,下面是surfaceview开启和关闭时的debug过程。surfaceview开启状态时的debug
SurfaceStatsCollector._get_surfaceflinger_frame_data()发现获取到的时间戳列表是空的
进一步发现,result中只有1个元素。
surfaceview关闭状态时的debug
SurfaceStatsCollector._get_surfaceflinger_frame_data()发现无法执行获取时间戳的分支
进去发现并没有包含相关数据