0
  1. 我用过,adb shell dumpsys gfxinfo

为什么我的应用程序信息关于 Draw、Process、Execute adb shell dumpsys gfxinfo 为空?我不明白为什么要清空该统计信息。请帮帮我。

** Graphics info for pid 3213 [com.kabam.marvelbattle] **

Recent DisplayList operations
  Save
  ClipRect
  DrawDisplayList
    DrawPatch
    Save
    ClipRect
    Translate
    DrawPatch
    DrawDisplayList
      DrawText
    RestoreToCount
  DrawDisplayList
  RestoreToCount
DrawRect
DrawPatch
DrawPatch
DrawText
DrawDisplayList
  DrawDisplayList
    DrawDisplayList
      DrawRect
      Save
  ClipRect
  DrawDisplayList
    DrawPatch
    Save
    ClipRect
    Translate
    DrawPatch
    DrawDisplayList
      DrawRect
      DrawText
    RestoreToCount
  DrawDisplayList
  RestoreToCount
DrawRect
DrawPatch
DrawPatch
DrawRect
DrawText
SetupShader
DrawRect
ResetShader
DrawDisplayList
  DrawDisplayList
DrawDisplayList
  DrawDisplayList
    DrawColor
DrawRect
DrawColor

Caches:
Current memory usage / total memory usage (bytes):
  TextureCache            30052 / 75497472
  LayerCache                  0 / 50331648
  RenderBufferCache           0 /  8388608
  GradientCache               0 /  1048576
  PathCache                   0 / 33554432
  TextDropShadowCache         0 /  6291456
  PatchCache                768 /   131072
  FontRenderer 0 A8     1048576 /  1048576
  FontRenderer 0 RGBA         0 /        0
  FontRenderer 0 total  1048576 /  1048576
Other:
 FboCache                    0 /       16
Total memory usage:
  1079396 bytes, 1.03 MB

Profile data in ms:
com.kabam.marvelbattle/com.explodingbarrel.Activity/android.view.ViewRootImpl@41a7df30
    Draw    Process Execute

View hierarchy:

  com.kabam.marvelbattle/com.explodingbarrel.Activity/android.view.ViewRootImpl@41a7df30

6 个视图,0.22 kB 的显示列表,5 帧渲染

Total ViewRootImpl: 1
Total Views:        6
Total DisplayList:  0.22 kB
4

1 回答 1

0

在 AOSP 中存在几种渲染 UI 的方法:

  • 基于 SKIA 等 CPU 库
  • 基于硬件加速库——比如HWUI

对于上述日志,输出意味着 - 您的 Activity 不使用加速的 HWUI - 没有为您的 Activity 视图分配HardwareRenderer实现。dumpGfxInfo () API实现在这里没有输出 - 查看

这是相关问题如何在 JB 上启用带有 GPU 后端的skia - 以启用 HWUI 利用率

于 2017-10-27T15:37:02.833 回答