【dump surfaceflinger】信息解读

转自:https://www.jianshu.com/p/233697d29160

1、特殊的宏

一般dump的第一行都是这样的:

Build configuration: [sf] [libui] [libgui]

这说明其实没有打开任何特殊的宏,实际上,如果一下特殊宏打开,第一行log会打印出来:

FRAMEBUFFER_FORCE_FORMAT,HAS_CONTEXT_PRIORITY,NEVER_DEFAULT_TO_ASYNC_MODE,TARGET_DISABLE_TRIPLE_BUFFERING,DONT_USE_FENCE_SYNC

一般情况下,这些宏一个都不会打开.

这里本地dump出来的信息如下,也就是说应该是打开了一个特殊的宏

Build configuration: [sf HAS_CONTEXT_PRIORITY=0 DISABLE_TRIPLE_BUFFERING 

PRESENT_TIME_OFFSET=0 FORCE_HWC_FOR_RBG_TO_YUV=0 MAX_VIRT_DISPLAY_DIM=0 

RUNNING_WITHOUT_SYNC_FRAMEWORK=0 NUM_FRAMEBUFFER_SURFACE_BUFFERS=3] [libui] [libgui]
Wide-Color information:
hasWideColorDisplay: 0
forceNativeColorMode: 0
Display 0 color modes:
    Current color mode: HAL_COLOR_MODE_NATIVE (0)

不知道这个后面这个是什么意思????

2、sync机制

这个涉及到surfaceflinger的同步机制,一般同步机制有三种。

第二行一般是这样的:

Sync configuration: [using: EGL_ANDROID_native_fence_sync EGL_KHR_wait_sync]

这行其实打印了目前使用的sync机制,这个值源于这段逻辑:

         if (useNativeFenceSync()) {
              mString.append(" EGL_ANDROID_native_fence_sync");
          }
          if (useFenceSync()) {
              mString.append(" EGL_KHR_fence_sync");
          }
          if (useWaitSync()) {
              mString.append(" EGL_KHR_wait_sync");
     }

注意,一二是互斥的,三可以与一二共存.

本地打印出来的信息如下:

Sync configuration: [using: EGL_ANDROID_native_fence_sync EGL_KHR_wait_sync]

3、DispSync的信息

这个就实在是很模糊了。

DispSync configuration: app phase 1000000 ns, sf phase 1000000 ns, present offset 0 ns (refresh 16666000 ns)

4、layer的dump信息

接下来就是很长的一段layer的dump,一般以这样一句话开始:

Visible layers (count = 9)

count的值来源于layersSortedByZ中layer的数量.
接下来就进入各个layer的dump,我们参考代码并以launcher所在的layer为例来解释下各行的意义:

+ Layer 0xb3f92000 (com.sec.android.app.launcher/com.android.launcher2.Launcher) id=87

0xb3f92000指向当前layer对象的值,括号中是当前layer的名称,id是创建layer时产生的序列号.

后面看到是没有了id这个选项。

本机的信息

Visible layers (count = 6)count的值来源于layersSortedByZ中layer的数量
+ Layer 0x7821663000 (com.android.systemui.ImageWallpaper#0)

4.1region的信息

  Region transparentRegion (this=0xb3f92164, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0xb3f92008, count=1)
    [  0,   0, 1440, 2560]

接下来的两段是两个Region的dump,每个region可能包含多个区域,所以这里count也可能不等于1.
前两行的值来源于activeTransparentRegion,表示的是这个layer里面透明区域的大小.
后两行值来源于visibleRegion,表示可见区域的大小.

本机信息如下:

  Region transparentRegion (this=0x7821663380, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x7821663010, count=1)
    [  0,   0,   0,   0]
  Region surfaceDamageRegion (this=0x7821663088, count=1)
    [  0,   0,   0,   0]

4.2基本信息

      layerStack=   0, z=    11000, 

pos=(0,0), size=(1440,1440), crop=(   0,   0,  -1,  -1), 

finalCrop=(   0,   0,  -1,  -1), isOpaque=1, invalidate=0, 

dataspace=(deprecated) sRGB Linear Full range, pixelformat=RGBx_8888 alpha=1.000, 

flags=0x00000003, tr=[1.00, 0.00][0.00, 1.00]
      client=0x7821634b00

 

layerStack

表示这个layer是保存在哪个layerstack中(不同的display是有不同的layerstack的,这点可以通过一个连接HDMI时的layerstack很容易确认).

z

表示Z轴坐标,z值越大,layer越靠上.

 

Pos

 

layer左上角的位置,这个值比较特殊的是ImageWallpaper这个layer的pos值,因为ImageWallpaper的大小大于屏幕大小,所以ImageWallpaper的pos值在屏幕的外面(note4是pos=(-560,0)).这个并不准确

 

size

layer的size

crop

代表裁剪区域,这点依然是对于壁纸很明显,因为壁纸layer大小大于屏幕,必须涉及到需要裁剪一部分显示在屏幕上,因此它的裁剪区域是crop=( 560, 0,2000,2560).这个并不一定准确

finalCrop

 

isOpaque

isOpaque代表是否是不透明的,只有完全不透明的layer这个值才是1,比如壁纸,像状态栏和launcher他们都是0,代表不是完全不透明的

invalidate

invalidate表示这个layer的数据是失效的,这个值绝大多数情况下都是0.因为我们看到的一般都是绘制好的有效的数据.一种情况下这值特别频繁的多见为1(一般情况应该是0,就是刚刚锁屏(解锁)时.因为突然锁屏,会导致绘制的内容和要显示的内容完全不同,导致layer的各种数据要重新计算,所以将layer置为失效.

dataspace

 

pixelformat

 

alpha

 

表示了这张layer的透明度,这个值跟isOpaque是有区别的.isOpaque表示了这个layer可以是透明的,也就是没有显示数据的地方,可以透明;而alpha表示透明度,也即是有数据的地方也可以因为透明度而收到影响产生透明的效果.

flag

 

tr

接下来的一组tr数据代表屏幕的旋转和缩放程度.大多数的layer实际上是不需要旋转和缩放的,因为他们定义的大小就是跟屏幕一致的,所以他们的这组数据是[1.00, 0.00][0.00, 1.00],实际上如果你使用这组数据来做矩阵变换的话,矩阵是不会发生变化的.

需要旋转的比较典型的场景是照相机.横着拿相机时它的layer的变换矩阵是[-1.00, 0.00][-0.00, -1.00],也就是旋转180°.

这个值的来源是上层调用setMatrix函数设置的.

client

client含义比较简单,值的来源是创建layer时,对应的SurfaceSession中mNativeClient.这东西也是跟SurfaceSession一一对应的,也就是跟SurfaceFlinger连接时一一对应的.从这个值我们可以判断,client值相同的layer,必然来自同一个进程(因为他们是由同一个连接创建出来的).

  • lag值含义丰富,它是众多flag或出来的结果,影响它值的包括:

enum {
      eLayerHidden        = 0x01,     // SURFACE_HIDDEN in SurfaceControl.java
      eLayerOpaque        = 0x02,     // SURFACE_OPAQUE
      eLayerTransparent   = 0x200,     // SURFACE_TRANSPARENT
};
 
enum {
    ePositionChanged            = 0x00000001,
    eLayerChanged               = 0x00000002,
    eSizeChanged                = 0x00000004,
    eAlphaChanged               = 0x00000008,
    eMatrixChanged              = 0x00000010,
    eTransparentRegionChanged   = 0x00000020,
    eVisibilityChanged          = 0x00000040,
    eLayerStackChanged          = 0x00000080,
    eCropChanged                = 0x00000100,
/* SRIB : Smg Surface Animator : State that will indicate animation change */
        e3DAnimationChanged         = 0x00001000,
/* SRIB : Smg Surface Animator : Change End*/
        eOpacityChanged             = 0x00000200,
// { SRUK-SFBLUR
        eTranslucentRegionChanged   = 0x00000400,
// SRUK-SFBLUR }
        eTransparencyChanged        = 0x80000000,
};
enum { // (keep in sync with Surface.java)
    eHidden             = 0x00000004,
    eDestroyBackbuffer  = 0x00000020,
    eSecure             = 0x00000080,
    eNonPremultiplied   = 0x00000100,
    eOpaque             = 0x00000400,
    eProtectedByApp     = 0x00000800,
    eProtectedByDRM     = 0x00001000,
    eCursorWindow       = 0x00002000,
    /* SISO Changes for Internal_Only - Start */
    eFXInternalDisplay = 0x80000000,
    /* SISO Changes for Internal_Only - End */
    eFXSurfaceNormal    = 0x00000000,
    eFXSurfaceDim       = 0x00020000,
    eFXSurfaceMask      = 0x000F0000,
    // begin of app fw : fixed orientation window
    eFixedOrientation   = 0x40000000,
    // end of app fw
    // begin of MDM remote control
    eNoRemoteControl      = 0x08000000,
    // end of MDM remote control
};

4.3buffer信息

本机的信息

format= 0, activeBuffer=[   0x   0:   0,  0], queued-frames=0, mRefreshPending=0

Format

0代表未知格式.

常见的layer中,dimlayer一般是0,大多数layer是1,壁纸是2,照相机的预览数据是4,视频播放也是4.

activeBuffer

 

  • activeBuffer的前两项表示了当前正在显示的buffer的宽和高.
  • 第三项表示Stride.这个值很有意思,我们发现他有时候是等于宽的,有时候是大于宽的,我们先来看下这个值的解释.
    The number of pixels that a line in the buffer takes in memory. This may be >= width.
    我们知道内存申请使用是需要成块对齐的,也就是说不是说使我们申请多大的内存,就会给我们多大的内存,因为涉及到对齐,所以很可能这个内存实际上是大于我们的需要的.(暂时没有仔细研究,有待确认)像有些marvell型号,内存是按照64位对齐的,那么我们申请一个100宽的buffer,系统就会给我们留出128的buffer大小供我们使用.
  • 第四项并没有什么特殊,表示format,跟前面的format应该是一致的.

queued-frames

queued-frames的含义是是否有新的帧,如果当前没有新的帧,这个值是0.

一般在画面持续变化时(照相预览,视频播放,窗口滑动,游戏),这个值会是1.表示有新的一帧.

偶尔也可以见到这个值是2(这个值应该最大就是2,因为只有三个缓冲区).

mRefreshPending

 

4.4surfaceflingerconsumer的dump信息

mTexName

前面创建的材质名称.

mCurrentTexture

mCurrentTexture的初始值是INVALID_BUFFER_SLOT,也就是-1,后面会在updateAndReleaseLocked时被更改,值的来源是使用的BufferItem的mBuf值,也就是mSlot,这应该是使用的buffer数组的slot值,这个变量的合理取值只有0,1,2三个值(mSlot is the slot index of this buffer ,default INVALID_BUFFER_SLOT).

mCurrentCrop

mCurrentCrop的值来源同样是updateAndReleaseLocked调用时被赋值,值的来源是BufferItem的mCrop值.这个值基本一直都是0,只有在视频播放和照相机时会被设置(值的来源有待更深入的研究, mCrop is the current crop rectangle for this buffer slot).

mCurrentTransform

mCurrentTransform的值和前面我们说过的tr值很类似. (mTransform is the current transform flags for this buffer slot. refer to NATIVE_WINDOW_TRANSFORM_* in <window.h>).

mAbandoned

 

本机的信息如下:

            mTexName=14 mCurrentTexture=1
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0

4.5cnsumerbase的dump信息

4.5.1bufferqueue的默认参数

            mAbandoned=0
            - BufferQueue mMaxAcquiredBufferCount=1 mMaxDequeuedBufferCount=2
              mDequeueBufferCannotBlock=0 mAsyncMode=0
              default-size=[720x1339] default-format=4 transform-hint=00 frame-counter=2808

mMaxAcquiredBufferCount

mMaxAcquiredBufferCount是允许同时acquire的buffer的数量

mDequeueBufferCannotBlock

mDequeueBufferCannotBlock几乎总是为0,除非一个应用同时控制了生产者和消费者,这很罕见.

default-size

这两个值的来源应该是BufferQueueConsumer::setDefaultBufferSize函数(不是特别确定,因为这段代码写的不好,严重破坏了封装性).

用处是这样的: mDefaultHeight holds the default height of allocated buffers. It is used in dequeueBuffer if a width and height of 0 are specified.

mMaxDequeuedBufferCount

 

mAsyncMode

 

default-format

mDefaultBufferFormat很简单,format含义可以参考前面的解释.

mDefaultBufferFormat can be set so it will override the buffer format when it isn't specified in dequeueBuffer.

transform-hint

同样用于旋转.

mTransformHint is the transform probably applied to buffers of this window. this is only a hint, actual transform may differ.

 

frame-counter

 

4.5.2队列中的buffer信息

02

02是mSlot的值,crop是裁剪区域,xform是旋转,这三个我们上面已经讲过,这里不再展开.

crop

剪裁

xform

旋转

time

ime是这个buffer被queue的时间(mTimestamp is the current timestamp for this buffer slot. This gets to set by queueBuffer each time this slot is queued. This value is guaranteed to be monotonically increasing for each newly acquired buffer.).

scale

scale是缩放模式,一般取值如下:

是在queued-frames=1不为0的时候,才有FIFO信息

            FIFO(1):
              02:0x7821655500 crop=[0,0,0,0] xform=0x00 time=1155.2193 scale=FREEZE

4.5.3各个buffer的信息

            Slots:
             >[01:0x7821654e00] state=ACQUIRED 0x782164bb00 frame=2807 [ 720x1339: 720,  4]
              [02:0x7821655500] state=QUEUED   0x781f1d8b40 frame=2808 [ 720x1339: 720,  4]
              [00:0x7821655ea0] state=FREE     0x782164bec0 frame=2806 [ 720x1339: 720,  4]

ACQUIRED是在显示的,

DEQUEUED是在绘制的,

QUEUED绘制完成还未显示的,

FREE是未使用的.

5 display信息的dump

首先会打印当前display的数量,数量基于mDisplays的大小,这个容器在SurfaceFlinger初始化时会生成数据,后面根据收到不同的消息在handleTransactionLocked函数中也会调整.
正常情况下是1,也就是只有一个display(Built-in Screen),当设备连接了HDMI或者使用了屏幕共享等功能时,会有额外的display加入,比如下面这个:

Displays (2 entries)
+ DisplayDevice: HDMI Screen
   type=1, hwcId=1, layerStack=6, (1920x1080), ANativeWindow=0xb4d94d08, orient= 0 (type=00000000), flips=1173, isSecure=1, 
    secureVis=0, powerMode=2, activeConfig=0, numLayers=1
   v:[0,0,1920,1080], f:[0,0,1920,1080], s:[0,0,1920,1080],transform:[[1.000,0.000,-0.000][0.000,1.000,-0.000][0.000,0.000,1.000]]
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=2, mDequeueBufferCannotBlock=0, default-size=[1920x1080], default-format=1, transform-hint=00, 
  FIFO(0)={}
 [00:0xb6418c80] state=FREE    , 0xb43ed880 [1920x1080:1920,  1]
 [01:0xb43cb300] state=FREE    , 0xb640d970 [1920x1080:1920,  1]
>[02:0xb43cb280] state=ACQUIRED, 0xb43ed830 [1920x1080:1920,  1]
+ DisplayDevice: Built-in Screen
   type=0, hwcId=0, layerStack=0, (1080x1920), ANativeWindow=0xb4d94608, orient= 0 (type=00000000), flips=3140, isSecure=1, 
    secureVis=0, powerMode=2, activeConfig=0, numLayers=2
   v:[0,0,1080,1920], f:[0,0,1080,1920], s:[0,0,1080,1920],transform:[[1.000,0.000,-0.000][0.000,1.000,-0.000][0.000,0.000,1.000]]

这个是连接了HDMI后的数据.

Displays (1 entries)//当前display的数量
+ DisplayDevice: Built-in Screen
   type=0, hwcId=0, layerStack=0, ( 720x1440), ANativeWindow=0x782161d010 (8:8:8:8), orient= 0 (type=00000000), flips=4078, isSecure=1, powerMode=2, activeConfig=2, numLayers=2
   v:[0,0,720,1440], f:[0,0,720,1440], s:[0,0,720,1440],transform:[[1.000,0.000,-0.000][0.000,1.000,-0.000][0.000,0.000,1.000]]

DisplayDevice

首先DisplayDevice是设备的名字,这个可以调用接口设置,但是比较常见的值一般有:Built-in Screen,HDMI Screen,Virtual Screen,wfdservice等等.

type

 

 

hwcId

hwcId需要注意的是,如果一个设备不是HWC合成的,这个值会是负数.需要指出的是,这个值不受开关overlay的影响,也就是说如果这个设备是支持HWC的,应该就不会是负数.目前来看,只有开发者选项模拟二级显示出现的display这个会是负数.

 

layerStack

ayerStack是存储layer的容器,我们知道每个display只会有一个layerstack来存储他要显示的layer,但是不同的display可以使用同一个layerStack,也可以使用不同的layerStack.

上面我们贴的这个就是两个display使用了不同的layerstack,因为他们显示的内容不一样(电视播放幻灯片).

后续我们可以研究下什么情况下会导致layerstack切换.

ANativeWindow

  • ANativeWindow代表要渲染的本地窗口,这个不同的display之间应该肯定不同.

orient

rient表示屏幕方向

 

  • 后面括号里面的type,是和我们上面说的设备类型完全不同的东西,这个值是由Transform::type算出来的.
    基本是下面这些值与或非出来的:

flips

代表屏幕翻页的次数,其实也就是SurfaceFlinger调用doComposition的次数,也就是屏幕画面更新的次数

isSecure

mIsSecure是屏幕自身的属性,mSecureLayerVisible应该会跟播放DRM之类的场景相关

powerMode

powerMode表示了屏幕当前的状态,它有以下取值:

常见的取值有0和2,代表屏幕熄灭和普通情况.

目前还没看到1和3的情况

activeConfig

总是0

numLayers

display可见的layer的数量

v、f、s

 

  • v,f,s分别代表三个大小:Viewport,Frame,Scissor.

6、eventthread信息

// EventThread的信息
VSYNC state: enabled
  soft-vsync: disabled
  numListeners=21,
  events-delivered: 11253
    0x781f17ba80: count=-1
    0x781f17d340: count=-1
    0x781f17dbe0: count=-1
    0x7820e1a300: count=-1
    0x7820e1b320: count=-1
    0x7820e1b500: count=-1
    0x7820e1bb60: count=-1
    0x7820e1c4c0: count=-1
    0x7820e1cbe0: count=-1
    0x7820e1cc40: count=-1
    0x7821755980: count=-1
    0x7821755d40: count=-1
    0x7821756160: count=-1
    0x78217567c0: count=-1
    0x78217d32a0: count=-1
    0x78217d3660: count=-1
    0x78217d3b40: count=0
    0x78217d3c60: count=-1
    0x78217d3f60: count=-1
    0x78217d41a0: count=-1
    0x78217d4380: count=-1

7、图像的合成信息

7.1HWC layer

可以看到总共有几层图像,每层图像的合成方式

Com Type显示Device表示GSP或者是DPU合成,

Client表示的是GPU合成,一般gsp/dpu合成可以更加省电。

// 图像的合成,
Display 0 HWC layers:
-------------------------------------------------------------------------------
 Layer name
           Z |  Comp Type |   Disp Frame (LTRB) |          Source Crop (LTRB)
-------------------------------------------------------------------------------
 Background for - com.imangi.templeru[...].prime31.UnityPlayerNativeActivity#0
       21004 |     Device |    0 1339  720 1440 |    0.0 1339.0  720.0 1440.0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
  4294967294 |     Device |    0    0  720 1339 |    0.0    0.0  720.0 1339.0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

何时使用gpu合成何时使用gsp/dpu合成

1、首先看硬件能力,比如gsp 有4层,支持2层缩放/旋转。  dpu 有8层,支持输入旋转

2、首选dpu 2、再选dpu和gsp混合合成  3、再选gsp 4、最后选择gsp

3、查看图像的合成信息

adb root & adb remount 

adb shell setprop debug.hwc.info  1

adb shell logcat |grep  -i hwc

7.2h/w composer

// HWC的dump
h/w composer state:
  h/w composer enabled
//接下来就开始打印各个layer的信息,
// 图像格式:RGB格式、yuv格式、RGBA格式
---------------------------------------------------------------------------------------------------------------------------------
 comp type |   format(图像格式) | fbc | pitch | height | transform |    blend | alpha | zorder |   dl   dt   dr   db |   vl   vt   vr   vb |
---------------------------------------------------------------------------------------------------------------------------------
       DPU | RGBX8888 |   N |   720 |   1440 |         0 |     NONE |   255 |      0 |    0    0    0    0 |    0    0    0    0 |
---------------------------------------------------------------------------------------------------------------------------------
       DPU |  RGB565  |   Y |   720 |   1344 |         0 |     NONE |   255 |      1 |
---------------------------------------------------------------------------------------------------------------------------------
Allocated buffers:
0x781f1d80a0: 4050.00 KiB |  720 ( 720) x 1440 |    1 |        2 | 0x933 | Background for - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x781f1d8500:  168.75 KiB |  720 ( 720) x   60 |    1 |        1 | 0xb00 | StatusBar#0
0x781f1d8640: 3765.94 KiB |  720 ( 720) x 1339 |    1 |        1 | 0x933 | com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x781f1d8780: 3765.94 KiB |  720 ( 720) x 1339 |    1 |        1 | 0x933 | com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x781f1d8b40: 1882.97 KiB |  720 ( 720) x 1339 |    1 |        4 | 0xb00 | SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x7820e33000:  168.75 KiB |  720 ( 720) x   60 |    1 |        1 | 0xb00 | StatusBar#0
0x7820e33640: 8100.00 KiB | 1440 (1440) x 1440 |    1 |        2 | 0xb00 | com.android.systemui.ImageWallpaper#0
0x7821649260: 4050.00 KiB |  720 ( 720) x 1440 |    1 |        1 | 0x1a00 | FramebufferSurface
0x78216493a0: 4050.00 KiB |  720 ( 720) x 1440 |    1 |        1 | 0x1a00 | FramebufferSurface
0x78216494e0: 4050.00 KiB |  720 ( 720) x 1440 |    1 |        1 | 0x1a00 | FramebufferSurface
0x782164afc0:  168.75 KiB |  720 ( 720) x   60 |    1 |        1 | 0xb00 | StatusBar#0
0x782164bb00: 1882.97 KiB |  720 ( 720) x 1339 |    1 |        4 | 0xb00 | SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x782164bec0: 1882.97 KiB |  720 ( 720) x 1339 |    1 |        4 | 0xb00 | SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
Total allocated (estimate): 37987.03 KB
IMG Graphics HAL state:
        handle      |  format  | refcount | ID
--------------------+----------+----------+----

一个完整的temp run2的dump的信息

Build configuration: [sf HAS_CONTEXT_PRIORITY=0 DISABLE_TRIPLE_BUFFERING PRESENT_TIME_OFFSET=0 FORCE_HWC_FOR_RBG_TO_YUV=0 MAX_VIRT_DISPLAY_DIM=0 RUNNING_WITHOUT_SYNC_FRAMEWORK=0 NUM_FRAMEBUFFER_SURFACE_BUFFERS=3] [libui] [libgui]

Wide-Color information:
hasWideColorDisplay: 0
forceNativeColorMode: 0
Display 0 color modes:
    Current color mode: HAL_COLOR_MODE_NATIVE (0)

Sync configuration: [using: EGL_ANDROID_native_fence_sync EGL_KHR_wait_sync]
DispSync configuration: app phase 1000000 ns, sf phase 1000000 ns, present offset 0 ns (refresh 16666000 ns)

Static screen stats:
  < 1 frames: 27.402 s (10.4%)
  < 2 frames: 29.802 s (11.3%)
  < 3 frames: 2.092 s (0.8%)
  < 4 frames: 1.318 s (0.5%)
  < 5 frames: 16.860 s (6.4%)
  < 6 frames: 15.569 s (5.9%)
  < 7 frames: 2.319 s (0.9%)
  7+ frames: 168.646 s (63.9%)

Buffering stats:
  [Layer name] <Active time> <Two buffer> <Double buffered> <Triple buffered>
  [BootAnimation#0] 35.23 1.000 1.000 0.000
  [SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0] 12.22 0.021 1.000 0.000
  [com.android.launcher3/com.android.launcher3.Launcher#0] 5.11 0.255 0.313 0.687
  [StatusBar#0] 4.18 0.326 0.612 0.388
  [VolumeDialogImpl#0] 0.81 0.352 1.000 0.000

Visible layers (count = 6)
+ Layer 0x7821663000 (com.android.systemui.ImageWallpaper#0)
  Region transparentRegion (this=0x7821663380, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x7821663010, count=1)
    [  0,   0,   0,   0]
  Region surfaceDamageRegion (this=0x7821663088, count=1)
    [  0,   0,   0,   0]
      layerStack=   0, z=    11000, pos=(0,0), size=(1440,1440), crop=(   0,   0,  -1,  -1), finalCrop=(   0,   0,  -1,  -1), isOpaque=1, invalidate=0, dataspace=(deprecated) sRGB Linear Full range, pixelformat=RGBx_8888 alpha=1.000, flags=0x00000003, tr=[1.00, 0.00][0.00, 1.00]
      client=0x7821634b00
      format= 2, activeBuffer=[1440x1440:1440,  2], queued-frames=0, mRefreshPending=0
            mTexName=5 mCurrentTexture=0
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0
            mAbandoned=0
            - BufferQueue mMaxAcquiredBufferCount=1 mMaxDequeuedBufferCount=2
              mDequeueBufferCannotBlock=0 mAsyncMode=0
              default-size=[1440x1440] default-format=2 transform-hint=00 frame-counter=2
            FIFO(0):
            Slots:
              [00:0x0] state=FREE    
              [01:0x0] state=FREE    
              [02:0x0] state=FREE    
+ Layer 0x781f1e3000 (Background for - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0)
  Region transparentRegion (this=0x781f1e3380, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x781f1e3010, count=1)
    [  0, 1339, 720, 1440]
  Region surfaceDamageRegion (this=0x781f1e3088, count=1)
    [  0,   0,   0,   0]
      layerStack=   0, z=    21004, pos=(0,0), size=( 720,1440), crop=(   0,1339, 720,1440), finalCrop=(   0,   0, 720,1440), isOpaque=1, invalidate=0, dataspace=Default (0), pixelformat=RGBx_8888 alpha=1.000, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
      client=0x7820e27180
      format= 2, activeBuffer=[ 720x1440: 720,  2], queued-frames=0, mRefreshPending=0
            mTexName=13 mCurrentTexture=0
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0
            mAbandoned=0
            - BufferQueue mMaxAcquiredBufferCount=1 mMaxDequeuedBufferCount=2
              mDequeueBufferCannotBlock=0 mAsyncMode=0
              default-size=[720x1440] default-format=2 transform-hint=00 frame-counter=1
            FIFO(0):
            Slots:
             >[00:0x78216579c0] state=ACQUIRED 0x781f1d80a0 frame=1 [ 720x1440: 720,  2]
              [01:0x0] state=FREE    
              [02:0x0] state=FREE    
+ LayerDim 0x781f00d000 (Background for - SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0)
  Region transparentRegion (this=0x781f00d380, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x781f00d010, count=1)
    [  0,   0,   0,   0]
  Region surfaceDamageRegion (this=0x781f00d088, count=1)
    [  0,   0,   0,   0]
      layerStack=   0, z=       -3, pos=(0,0), size=( 720,1339), crop=(   0,   0,  -1,  -1), finalCrop=(   0,   0,  -1,  -1), isOpaque=0, invalidate=0, dataspace=Default (0), pixelformat=Unknown/None alpha=1.000, flags=0x00000002, tr=[1.00, 0.00][0.00, 1.00]
      client=0x7821635640
      format= 0, activeBuffer=[   0x   0:   0,  0], queued-frames=0, mRefreshPending=0
            mTexName=15 mCurrentTexture=-1
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0
            mAbandoned=0
            - BufferQueue mMaxAcquiredBufferCount=1 mMaxDequeuedBufferCount=2
              mDequeueBufferCannotBlock=0 mAsyncMode=0
              default-size=[1x1] default-format=1 transform-hint=00 frame-counter=0
            FIFO(0):
            Slots:
              [00:0x0] state=FREE    
              [01:0x0] state=FREE    
              [02:0x0] state=FREE    
+ Layer 0x781f1e6000 (SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0)
  Region transparentRegion (this=0x781f1e6380, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x781f1e6010, count=1)
    [  0,   0, 720, 1339]
  Region surfaceDamageRegion (this=0x781f1e6088, count=1)
    [  0,   0,  -1,  -1]
      layerStack=   0, z=       -2, pos=(0,0), size=( 720,1339), crop=(   0,   0,  -1,  -1), finalCrop=(   0,   0,  -1,  -1), isOpaque=1, invalidate=0, dataspace=(deprecated) sRGB Linear Full range, pixelformat=RGB_565 alpha=1.000, flags=0x00000002, tr=[1.00, 0.00][0.00, 1.00]
      client=0x7821635640
      format= 4, activeBuffer=[ 720x1339: 720,  4], queued-frames=1, mRefreshPending=0
            mTexName=14 mCurrentTexture=1
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0
            mAbandoned=0
            - BufferQueue mMaxAcquiredBufferCount=1 mMaxDequeuedBufferCount=2
              mDequeueBufferCannotBlock=0 mAsyncMode=0
              default-size=[720x1339] default-format=4 transform-hint=00 frame-counter=2808
            FIFO(1):
              02:0x7821655500 crop=[0,0,0,0] xform=0x00 time=1155.2193 scale=FREEZE
            Slots:
             >[01:0x7821654e00] state=ACQUIRED 0x782164bb00 frame=2807 [ 720x1339: 720,  4]
              [02:0x7821655500] state=QUEUED   0x781f1d8b40 frame=2808 [ 720x1339: 720,  4]
              [00:0x7821655ea0] state=FREE     0x782164bec0 frame=2806 [ 720x1339: 720,  4]
+ Layer 0x78217ab000 (com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0)
  Region transparentRegion (this=0x78217ab380, count=1)
    [  0,   0, 720, 1339]
  Region visibleRegion (this=0x78217ab010, count=1)
    [  0,   0,   0,   0]
  Region surfaceDamageRegion (this=0x78217ab088, count=1)
    [  0,   0,   0,   0]
      layerStack=   0, z=    21005, pos=(0,0), size=( 720,1339), crop=(   0,   0, 720,1339), finalCrop=(   0,   0,   0,   0), isOpaque=0, invalidate=0, dataspace=Default (0), pixelformat=RGBA_8888 alpha=1.000, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
      client=0x7820e27180
      format= 1, activeBuffer=[ 720x1339: 720,  1], queued-frames=0, mRefreshPending=0
            mTexName=12 mCurrentTexture=0
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0
            mAbandoned=0
            - BufferQueue mMaxAcquiredBufferCount=1 mMaxDequeuedBufferCount=2
              mDequeueBufferCannotBlock=0 mAsyncMode=0
              default-size=[720x1339] default-format=1 transform-hint=00 frame-counter=3
            FIFO(0):
            Slots:
             >[00:0x7820e2ca80] state=ACQUIRED 0x781f1d8640 frame=3 [ 720x1339: 720,  1]
              [01:0x7821655dc0] state=FREE     0x781f1d8780 frame=2 [ 720x1339: 720,  1]
              [02:0x0] state=FREE    
+ Layer 0x78217d6000 (StatusBar#0)
  Region transparentRegion (this=0x78217d6380, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x78217d6010, count=1)
    [  0,   0,   0,   0]
  Region surfaceDamageRegion (this=0x78217d6088, count=1)
    [  0,   0,   0,   0]
      layerStack=   0, z=   181000, pos=(0,0), size=( 720,  60), crop=(   0,   0, 720,  60), finalCrop=(   0,   0,  -1,  -1), isOpaque=0, invalidate=0, dataspace=(deprecated) sRGB Linear Full range, pixelformat=RGBA_8888 alpha=1.000, flags=0x00000001, tr=[1.00, 0.00][0.00, 1.00]
      client=0x7821634b00
      format= 1, activeBuffer=[ 720x  60: 720,  1], queued-frames=0, mRefreshPending=0
            mTexName=4 mCurrentTexture=0
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0
            mAbandoned=0
            - BufferQueue mMaxAcquiredBufferCount=1 mMaxDequeuedBufferCount=2
              mDequeueBufferCannotBlock=0 mAsyncMode=0
              default-size=[720x60] default-format=1 transform-hint=00 frame-counter=460
            FIFO(0):
            Slots:
             >[00:0x7820e2c540] state=ACQUIRED 0x7820e33000 frame=460 [ 720x  60: 720,  1]
              [01:0x7821655420] state=FREE     0x781f1d8500 frame=458 [ 720x  60: 720,  1]
              [02:0x7821655180] state=FREE     0x782164afc0 frame=459 [ 720x  60: 720,  1]
Displays (1 entries)
+ DisplayDevice: Built-in Screen
   type=0, hwcId=0, layerStack=0, ( 720x1440), ANativeWindow=0x782161d010 (8:8:8:8), orient= 0 (type=00000000), flips=4078, isSecure=1, powerMode=2, activeConfig=2, numLayers=2
   v:[0,0,720,1440], f:[0,0,720,1440], s:[0,0,720,1440],transform:[[1.000,0.000,-0.000][0.000,1.000,-0.000][0.000,0.000,1.000]]
mAbandoned=0
- BufferQueue mMaxAcquiredBufferCount=2 mMaxDequeuedBufferCount=1
  mDequeueBufferCannotBlock=0 mAsyncMode=0
  default-size=[720x1440] default-format=1 transform-hint=00 frame-counter=36
FIFO(0):
Slots:
 >[00:0x78216548c0] state=ACQUIRED 0x7821649260 frame=36 [ 720x1440: 720,  1]
  [02:0x7821654b60] state=FREE     0x78216494e0 frame=34 [ 720x1440: 720,  1]
  [01:0x78216549a0] state=FREE     0x78216493a0 frame=35 [ 720x1440: 720,  1]
SurfaceFlinger global state:
EGL implementation : 1.4 build 1.9@4991288
EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_IMG_cl_image EGL_ANDROID_blob_cache EGL_ANDROID_image_native_buffer EGL_ANDROID_recordable EGL_ANDROID_framebuffer_target EGL_ANDROID_native_fence_sync EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_EXT_pixel_format_float EGL_EXT_create_context_robustness EGL_IMG_image_plane_attribs EGL_IMG_image_debug_dump EGL_KHR_partial_update EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_yuv_surface EGL_IMG_context_priority EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_mutable_render_buffer 
GLES: Imagination Technologies, PowerVR Rogue GE8322, OpenGL ES 3.2 build 1.9@4991288
GL_EXT_debug_marker GL_ANDROID_extension_pack_es31a GL_EXT_blend_minmax GL_EXT_buffer_storage GL_EXT_clear_texture GL_EXT_color_buffer_float GL_EXT_conservative_depth GL_EXT_copy_image GL_EXT_discard_framebuffer GL_EXT_draw_buffers GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_float_blend GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_gpu_shader5 GL_EXT_multi_draw_arrays GL_EXT_multisampled_render_to_texture GL_EXT_occlusion_query_boolean GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_robustness GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_group_vote GL_EXT_shader_io_blocks GL_EXT_shader_non_constant_global_initializers GL_EXT_shader_pixel_local_storage GL_EXT_shader_pixel_local_storage2 GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_sparse_texture GL_EXT_sRGB_write_control GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_cube_map_array GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_sRGB_decode GL_EXT_texture_sRGB_R8 GL_EXT_texture_sRGB_RG8 GL_EXT_YUV_target GL_IMG_bindless_texture GL_IMG_framebuffer_downsample GL_IMG_multisampled_render_to_texture GL_IMG_program_binary GL_IMG_read_format GL_IMG_shader_binary GL_IMG_texture_compression_pvrtc GL_IMG_texture_compression_pvrtc2 GL_IMG_texture_format_BGRA8888 GL_IMG_texture_npot GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_depth_texture GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_element_index_uint GL_OES_fragment_precision_high GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_get_program_binary GL_OES_gpu_shader5 GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_required_internalformat GL_OES_rgb8_rgba8 GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_image_atomic GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_standard_derivatives GL_OES_surfaceless_context GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_npot GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_vertex_array_object GL_OES_vertex_half_float GL_OVR_multiview GL_OVR_multiview2 GL_OVR_multiview_multisampled_render_to_texture
Wide-color: Off
  Region undefinedRegion (this=0x7821689cd8, count=1)
    [  0,   0,   0,   0]
  orientation=0, isDisplayOn=1
  last eglSwapBuffers() time: 1173.385000 us
  last transaction time     : 22.961000 us
  transaction-flags         : 00000000
  refresh-rate              : 60.002400 fps
  x-dpi                     : 268.941010
  y-dpi                     : 302.281006
  gpu_to_cpu_unsupported    : 0
  eglSwapBuffers time: 0.000000 us
  transaction time: 0.000000 us
VSYNC state: enabled
  soft-vsync: disabled
  numListeners=21,
  events-delivered: 11253
    0x781f17ba80: count=-1
    0x781f17d340: count=-1
    0x781f17dbe0: count=-1
    0x7820e1a300: count=-1
    0x7820e1b320: count=-1
    0x7820e1b500: count=-1
    0x7820e1bb60: count=-1
    0x7820e1c4c0: count=-1
    0x7820e1cbe0: count=-1
    0x7820e1cc40: count=-1
    0x7821755980: count=-1
    0x7821755d40: count=-1
    0x7821756160: count=-1
    0x78217567c0: count=-1
    0x78217d32a0: count=-1
    0x78217d3660: count=-1
    0x78217d3b40: count=0
    0x78217d3c60: count=-1
    0x78217d3f60: count=-1
    0x78217d41a0: count=-1
    0x78217d4380: count=-1

Display 0 HWC layers:
-------------------------------------------------------------------------------
 Layer name
           Z |  Comp Type |   Disp Frame (LTRB) |          Source Crop (LTRB)
-------------------------------------------------------------------------------
 Background for - com.imangi.templeru[...].prime31.UnityPlayerNativeActivity#0
       21004 |     Device |    0 1339  720 1440 |    0.0 1339.0  720.0 1440.0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
  4294967294 |     Device |    0    0  720 1339 |    0.0    0.0  720.0 1339.0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

h/w composer state:
  h/w composer enabled
---------------------------------------------------------------------------------------------------------------------------------
 comp type |   format | fbc | pitch | height | transform |    blend | alpha | zorder |   dl   dt   dr   db |   vl   vt   vr   vb |
---------------------------------------------------------------------------------------------------------------------------------
       DPU | RGBX8888 |   N |   720 |   1440 |         0 |     NONE |   255 |      0 |    0    0    0    0 |    0    0    0    0 |
---------------------------------------------------------------------------------------------------------------------------------
       DPU |  RGB565  |   Y |   720 |   1344 |         0 |     NONE |   255 |      1 |
---------------------------------------------------------------------------------------------------------------------------------
Allocated buffers:
0x781f1d80a0: 4050.00 KiB |  720 ( 720) x 1440 |    1 |        2 | 0x933 | Background for - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x781f1d8500:  168.75 KiB |  720 ( 720) x   60 |    1 |        1 | 0xb00 | StatusBar#0
0x781f1d8640: 3765.94 KiB |  720 ( 720) x 1339 |    1 |        1 | 0x933 | com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x781f1d8780: 3765.94 KiB |  720 ( 720) x 1339 |    1 |        1 | 0x933 | com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x781f1d8b40: 1882.97 KiB |  720 ( 720) x 1339 |    1 |        4 | 0xb00 | SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x7820e33000:  168.75 KiB |  720 ( 720) x   60 |    1 |        1 | 0xb00 | StatusBar#0
0x7820e33640: 8100.00 KiB | 1440 (1440) x 1440 |    1 |        2 | 0xb00 | com.android.systemui.ImageWallpaper#0
0x7821649260: 4050.00 KiB |  720 ( 720) x 1440 |    1 |        1 | 0x1a00 | FramebufferSurface
0x78216493a0: 4050.00 KiB |  720 ( 720) x 1440 |    1 |        1 | 0x1a00 | FramebufferSurface
0x78216494e0: 4050.00 KiB |  720 ( 720) x 1440 |    1 |        1 | 0x1a00 | FramebufferSurface
0x782164afc0:  168.75 KiB |  720 ( 720) x   60 |    1 |        1 | 0xb00 | StatusBar#0
0x782164bb00: 1882.97 KiB |  720 ( 720) x 1339 |    1 |        4 | 0xb00 | SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
0x782164bec0: 1882.97 KiB |  720 ( 720) x 1339 |    1 |        4 | 0xb00 | SurfaceView - com.imangi.templerun2/com.prime31.UnityPlayerNativeActivity#0
Total allocated (estimate): 37987.03 KB
IMG Graphics HAL state:
        handle      |  format  | refcount | ID
--------------------+----------+----------+----

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值