|
|
首先,分析现在的GraphicBuffer的分配情况:
adb shell dumpsys SurfaceFlinger:::
Build configuration: [sf] [libui] [libgui]
Sync configuration: [using: EGL_ANDROID_native_fence_sync EGL_KHR_wait_sync]
DispSync configuration: app phase -8000000 ns, sf phase -8000000 ns, present offset 0 ns (refresh 17226529 ns)
Visible layers (count = 7)
+ LayerDim 0x5598616ae0 (DimLayer-0-AnimBg)
Region transparentRegion (this=0x5598616cc0, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0x5598616af0, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 0, pos=(0,0), size=( 16, 16), crop=( 0, 0, -1, -1), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000001, tr=[1.00, 0.00][0.00, 1.00]
client=0x559860e970
format= 0, activeBuffer=[ 0x 0: 0, 0], queued-frames=0, mRefreshPending=0
mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
mTexName=5 mCurrentTexture=-1
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1x1], default-format=1, transform-hint=04, FIFO(0)={}
this=0x55986183c0 (mConsumerName=DimLayer-0-AnimBg, mConnectedApi=0, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=4, mPid=213, producer=[-1:], consumer=[213:/system/bin/surfaceflinger])
*BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=0), mMode=TRACK_CONSUMER
+ Layer 0x55987bcc60 (com.android.systemui.ImageWallpaper)
Region transparentRegion (this=0x55987bce40, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0x55987bcc70, count=1)
[ 0, 260, 960, 820]
layerStack= 0, z= 21000, pos=(0,260), size=(1920, 560), crop=( 0, 0, 960, 560), isOpaque=1, invalidate=0, alpha=0xff, flags=0x00000002, tr=[1.00, 0.00][0.00, 1.00]
client=0x55986ed710
format= 2, activeBuffer=[ 560x1920: 560, 2], queued-frames=0, mRefreshPending=0
mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
mTexName=8 mCurrentTexture=0
mCurrentCrop=[0,0,0,0] mCurrentTransform=0x7
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1920x560], default-format=2, transform-hint=04, FIFO(0)={}
this=0x5598638de0 (mConsumerName=com.android.systemui.ImageWallpaper, mConnectedApi=0, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=9, mPid=213, producer=[-1:com.android.systemui], consumer=[213:/system/bin/surfaceflinger])
*BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
[00] handle=0x559870ea50, fence=0x5598637d00, time=0x297b987a8c
+ Layer 0x55987d09e0 (com.android.launcher3/com.android.launcher3.Launcher)
Region transparentRegion (this=0x55987d0bc0, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0x55987d09f0, count=1)
[ 0, 0, 960, 1080]
layerStack= 0, z= 21005, pos=(0,0), size=( 960,1080), crop=( 0, 0, 960,1080), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
client=0x5598673660
format= 1, activeBuffer=[1080x 960:1088, 1], queued-frames=0, mRefreshPending=0
mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
mTexName=2 mCurrentTexture=0
mCurrentCrop=[0,0,0,0] mCurrentTransform=0x7
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[960x1080], default-format=1, transform-hint=04, FIFO(0)={}
this=0x55987d21a0 (mConsumerName=com.android.launcher3/com.android.launcher3.Launcher, mConnectedApi=1, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=6, mPid=213, producer=[1923:com.android.launcher3], consumer=[213:/system/bin/surfaceflinger])
>[00:0x559876b220] state=ACQUIRED, 0x5598789ba0 [1080x 960:1088, 1]
[01:0x55987a54b0] state=FREE , 0x55985abed0 [1080x 960:1088, 1]
[02:0x559879d910] state=FREE , 0x55985fe140 [1080x 960:1088, 1]
*BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
[00] handle=0x5598789ba0, fence=0x5598741520, time=0x2253c0bea6a
+ Layer 0x559860f480 (FocusedStackFrame)
Region transparentRegion (this=0x559860f660, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0x559860f490, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 21006, pos=(0,0), size=( 1, 1), crop=( 0, 0, -1, -1), isOpaque=0, invalidate=0, alpha=0x4d, flags=0x00000001, tr=[1.00, 0.00][0.00, 1.00]
client=0x559860e970
format= 1, activeBuffer=[ 0x 0: 0, 0], queued-frames=0, mRefreshPending=0
mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
mTexName=3 mCurrentTexture=-1
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1x1], default-format=1, transform-hint=04, FIFO(0)={}
this=0x5598610c40 (mConsumerName=FocusedStackFrame, mConnectedApi=0, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=2, mPid=213, producer=[-1:], consumer=[213:/system/bin/surfaceflinger])
*BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=0), mMode=TRACK_CONSUMER
+ Layer 0x559861b2d0 (StatusBar)
Region transparentRegion (this=0x559861b4b0, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0x559861b2e0, count=1)
[ 0, 260, 960, 293]
layerStack= 0, z= 151000, pos=(0,260), size=( 960, 33), crop=( 0, 0, 960, 33), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
client=0x55986ed710
format= 1, activeBuffer=[ 33x 960: 48, 1], queued-frames=0, mRefreshPending=0
mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
mTexName=6 mCurrentTexture=1
mCurrentCrop=[0,0,0,0] mCurrentTransform=0x7
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[960x33], default-format=1, transform-hint=04, FIFO(0)={}
this=0x559861cb60 (mConsumerName=StatusBar, mConnectedApi=1, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=7, mPid=213, producer=[1458:com.android.systemui], consumer=[213:/system/bin/surfaceflinger])
[00:0x559861fd80] state=FREE , 0x5598841c20 [ 33x 960: 48, 1]
>[01:0x5598620ff0] state=ACQUIRED, 0x5598808950 [ 33x 960: 48, 1]
*BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
[00] handle=0x5598808950, fence=0x559876f510, time=0x226a8c9c6f3
+ Layer 0x55986303b0 (NavigationBar)
Region transparentRegion (this=0x5598630590, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0x55986303c0, count=1)
[ 0, 757, 960, 820]
layerStack= 0, z= 201000, pos=(0,757), size=( 960, 63), crop=( 0, 0, 960, 63), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
client=0x55986ed710
format= 1, activeBuffer=[ 63x 960: 64, 1], queued-frames=0, mRefreshPending=0
mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
mTexName=7 mCurrentTexture=0
mCurrentCrop=[0,0,0,0] mCurrentTransform=0x7
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[960x63], default-format=1, transform-hint=04, FIFO(0)={}
this=0x5598808df0 (mConsumerName=NavigationBar, mConnectedApi=1, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=16, mPid=213, producer=[1458:com.android.systemui], consumer=[213:/system/bin/surfaceflinger])
>[00:0x559876f420] state=ACQUIRED, 0x55986ed2d0 [ 63x 960: 64, 1]
[01:0x559880b650] state=FREE , 0x5598632390 [ 63x 960: 64, 1]
[02:0x5598632430] state=FREE , 0x55987a7da0 [ 63x 960: 64, 1]
*BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
[00] handle=0x55986ed2d0, fence=0x559866d300, time=0x2252f75508a
+ LayerDim 0x5598612d00 (DimLayer-0)
Region transparentRegion (this=0x5598612ee0, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0x5598612d10, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 270999, pos=(-480,-270), size=(2880,1620), crop=( 0, 0, -1, -1), isOpaque=0, invalidate=0, alpha=0x00, flags=0x00000001, tr=[1.00, 0.00][0.00, 1.00]
client=0x559860e970
format= 0, activeBuffer=[ 0x 0: 0, 0], queued-frames=0, mRefreshPending=0
mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
mTexName=4 mCurrentTexture=-1
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[2880x1620], default-format=1, transform-hint=04, FIFO(0)={}
this=0x5598614630 (mConsumerName=DimLayer-0, mConnectedApi=0, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=3, mPid=213, producer=[-1:], consumer=[213:/system/bin/surfaceflinger])
*BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=0), mMode=TRACK_CONSUMER
Displays (1 entries)
+ DisplayDevice: Built-in Screen
type=0, hwcId=0, layerStack=0, (1080x1920), ANativeWindow=0x55985f5af0, orient= 1 (type=00000003), flips=7475, isSecure=1, secureVis=0, powerMode=2, activeConfig=0, numLayers=4
v:[0,0,1920,1080], f:[0,0,1920,1080], s:[0,0,1080,1920],transform:[[0.000,-1.000,1080.000][1.000,0.000,0.000][0.000,0.000,1.000]]
hworient= 0, mirror=-1
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1080x1920], default-format=1, transform-hint=00, FIFO(0)={}
this=0x55985f3ad0 (mConsumerName=FrameBufferSurface_0, mConnectedApi=1, mConsumerUsageBits=0x1a00, mOverrideMaxBufferCount=0, mId=0, mPid=213, producer=[213:/system/bin/surfaceflinger], consumer=[213:/system/bin/surfaceflinger])
[00:0x55985fb9e0] state=FREE , 0x55985afcc0 [1080x1920:1088, 1]
>[01:0x559865a8c0] state=ACQUIRED, 0x5598799b40 [1080x1920:1088, 1]
[02:0x559870eef0] state=FREE , 0x55985ed5b0 [1080x1920:1088, 1]
*BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
[00] handle=0x5598799b40, fence=0x559861f5c0, time=0x22518a2e716
SurfaceFlinger global state:
EGL implementation : 1.4 Midgard-"r5p0-06rel0"
EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_KHR_cl_event2 EGL_ANDROID_image_native_buffer EGL_ANDROID_recordable EGL_ANDROID_native_fence_sync EGL_ANDROID_framebuffer_target EGL_ANDROID_blob_cache EGL_ANDROID_image_crop
GLES: ARM, Mali-T720, OpenGL ES 3.1
GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_KHR_blend_equation_advanced GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic
Region undefinedRegion (this=0x55985f5818, count=3)
[ 0, 0, 260, 960]
[820, 0, 1080, 960]
[ 0, 960, 1080, 1920]
orientation=1, isDisplayOn=1
last eglSwapBuffers() time: 1275.692000 us
last transaction time : 78.384000 us
transaction-flags : 00000000
refresh-rate : 58.050000 fps
x-dpi : 210.000000
y-dpi : 210.000000
gpu_to_cpu_unsupported : 0
eglSwapBuffers time: 0.000000 us
transaction time: 0.000000 us
VSYNC state: disabled
soft-vsync: disabled
numListeners=10,
events-delivered: 8406
0x5598545c40: count=-1
0x55985af790: count=-1
0x55985afd60: count=-1
0x55985b5b00: count=-1
0x55985f9840: count=-1
0x559861a760: count=-1
0x559862ad20: count=-1
0x5598693260: count=-1
0x559873b1a0: count=-1
0x55987c9000: count=-1
h/w composer state:
h/w composer present and enabled
Hardware Composer state (version 01040000):
mDebugForceFakeVSync=0
Display[0] configurations (* current):
* 0: 1080x1920, xdpi=210.000000, ydpi=210.000000, refresh=17226529
numHwLayers=5, flags=00000000
type | handle | hint | flag | tr | blnd | format | source crop (l,t,r,b) | frame | name
-----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------
HWC | 559870ea50 | 0002 | 0000 | 00 | 0100 | RGBx_8888 | 0.0, 0.0, 560.0, 960.0 | 260, 0, 820, 960 | com.android.systemui.ImageWallpaper
HWC | 5598789ba0 | 0002 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 1080.0, 960.0 | 0, 0, 1080, 960 | com.android.launcher3/com.android.launcher3.Launcher
HWC | 5598808950 | 0002 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 33.0, 960.0 | 787, 0, 820, 960 | StatusBar
HWC | 55986ed2d0 | 0002 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 63.0, 960.0 | 260, 0, 323, 960 | NavigationBar
FB TARGET | 5598799b40 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 1080.0, 1920.0 | 0, 0, 1080, 1920 | HWC_FRAMEBUFFER_TARGET
[HWC Features Support]
ext=0 vir=1 enhance=1 svp=0
[HWC Platform Config]
plat=40011 comp=0 client=0
[HWC Compose State (0)]
(0) f=0x2 x=260 y=0 w=560 h=960
(1) f=0x1 x=0 y=0 w=1080 h=960
(2) f=0x1 x=787 y=0 w=33 h=960
(3) f=0x1 x=260 y=0 w=63 h=960
Total size: 6666240 bytes
Allocated buffers:
0x55985abed0: 4080.00 KiB | 1080 (1088) x 960 | 1 | 0x00000b00
0x55985afcc0: 8160.00 KiB | 1080 (1088) x 1920 | 1 | 0x00001a00
0x55985ed5b0: 8160.00 KiB | 1080 (1088) x 1920 | 1 | 0x00001a00
0x55985fe140: 4080.00 KiB | 1080 (1088) x 960 | 1 | 0x00000b00
0x5598632390: 240.00 KiB | 63 ( 64) x 960 | 1 | 0x00000b00
0x55986ed2d0: 240.00 KiB | 63 ( 64) x 960 | 1 | 0x00000b00
0x559870ea50: 4200.00 KiB | 560 ( 560) x 1920 | 2 | 0x00000b00
0x5598789ba0: 4080.00 KiB | 1080 (1088) x 960 | 1 | 0x00000b00
0x5598799b40: 8160.00 KiB | 1080 (1088) x 1920 | 1 | 0x00001a00
0x55987a7da0: 240.00 KiB | 63 ( 64) x 960 | 1 | 0x00000b00
0x55988085b0: 180.00 KiB | 33 ( 48) x 960 | 1 | 0x00000b00
0x5598808950: 180.00 KiB | 33 ( 48) x 960 | 1 | 0x00000b00
0x5598841c20: 180.00 KiB | 33 ( 48) x 960 | 1 | 0x00000b00
Total allocated (estimate): 42180.00 KB
|
|