0
我試圖在使用腳本定期開發時自動執行一些任務。其中之一是打開和關閉GPU配置文件渲染。但是,我無法找到adb命令來顯示/隱藏它。如何使用adb命令將配置文件GPU渲染顯示爲條形圖?
我試圖在使用腳本定期開發時自動執行一些任務。其中之一是打開和關閉GPU配置文件渲染。但是,我無法找到adb命令來顯示/隱藏它。如何使用adb命令將配置文件GPU渲染顯示爲條形圖?
的檔案GPU在控制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
禁用它。
非常感謝@ alex-p。 – abhiank