2017-02-27 66 views

回答

2

檔案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禁用它。

+0

非常感謝@ alex-p。 – abhiank