如何使用ADB命令显示/隐藏配置文件GPU渲染为bar



我正在尝试使用脚本定期开发时执行的某些任务。其中之一是打开和关闭GPU配置文件渲染。但是,我找不到显示/隐藏的ADB命令。

配置文件gpu Rendering 复选框开发人员选项控制debug.hwui.profile系统属性的值:

/**
  * System property used to enable or disable hardware rendering profiling.
  * The default value of this property is assumed to be false.
  *
  * When profiling is enabled, the adb shell dumpsys gfxinfo command will
  * output extra information about the time taken to execute by the last
  * frames.
  *
  * Possible values:
  * "true", to enable profiling
  * "visual_bars", to enable profiling and visualize the results on screen
  * "false", to disable profiling
  *
  * @see #PROFILE_PROPERTY_VISUALIZE_BARS
  *
  * @hide
  */
public static final String PROFILE_PROPERTY = "debug.hwui.profile";

因此,您可以使用 setprop debug.hwui.profile visual_bars命令启用分析和setprop debug.hwui.profile false进行禁用。

最新更新