adb shell dunpsys SurfaceFlinger

对于很多Android的显示问题,我们需要使用adb shell dumpsys SurfaceFlinger命令来获取SurfaceFlinger的dump信息,这对于我们分析问题有很大的帮助,因此记录一下我常用的信息。

用法:连接手机执行命令:adb shell dunpsys SurfaceFlinger >sf.log

找到并打开日志文件

关键字:HWC layers

HWC的dump从这句话开始:

h/w composer state:
  h/w composer present and enabled

后面是HWComposer的dump函数:

  • 首先打印的是hwc的版本,目前更多的是0103和0104;
  • mDebugForceFakeVSync的值源自属性debug.sf.no_hw_vsync,打开之后会使用纯软件模拟VSync信号.
  • type表示合成类型,可取的值包括以下几种: "GLES","HWC","BKGND", "FB TARGET","SIDEBAND","HWC_CURSOR","FB_BLIT","UNKNOWN".(更详细的一些解释可以参见hwcomposer.h)
  • handle是个标识符,可以跟某个buffer的handle对应.(Handle of buffer to compose. This handle is guaranteed to have been allocated from gralloc using the GRALLOC_USAGE_HW_COMPOSER usage flag. If the layer's handle is unchanged across two consecutive prepare calls and the HWC_GEOMETRY_CHANGED flag is not set for the second call then the HWComposer implementation may assume that the contents of the buffer have not changed. )
  • hint is bit mask set by the HWC implementation during (prepare)().It is preserved between (prepare)() calls, unless the HWC_GEOMETRY_CHANGED flag is set, in which case it is reset to 0.

结果:图层信息,带有包名、进程号和分辨率等等信息,带*的表示当前显示的图层,由上到下为顶到底的

关系。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值