in
Android
- 26 9月, 2015
デバッグでよく使うコマンド dumpsys編 その4 SurfaceFlinger
前回はdumpsysのActivity系情報を紹介しましたが今回はSurface情報を紹介します。
Surfaceの情報を取得するには、SurfaceをまとめるSurfaceFlingerというサービスのdumpを取得する必要があります。
いつも通りのdumpsysコマンドですが、SurfaceFlingerの情報のみを取得する場合は下記のようなコマンドになります。
$ adb shell dumpsys SurfaceFlinger
取得できる情報は下記”SurfaceFlingerのdump”となります。
よく使う情報としては”Visible layers”以下にならぶLayerの情報です。
このLayer一つがSurface一枚を表しています。
よく見る値としては下記になります。
・z:Surfaceのz orderを表す。
Surfaceの重なり方を確認する際に使用する。
・visibleRegion:Surfaceが表示される領域を表す。
[左、上、右、下]の座標を確認する際に使用する。
・alpha:Surfaceの透明度を表す。
0に近い値であるほど透明になる。
このほかにもDisplayの情報やWindowのdumpとの連携等紹介したいことは他にもあるのですが、今回はここまでとします。
次回も引き続きSurfaceFlingerの情報を紹介します。
ちなみに以下のSurfaceFlingerのdumpはエミュレータ起動後キーガード表示時に取得したdumpとなっています。
●SurfaceFlingerのdump
Build configuration: [sf] [libui] [libgui] Sync configuration: [using: EGL_KHR_fence_sync] Visible layers (count = 9) + LayerDim 0xb72deb50 (DimLayer) Region transparentRegion (this=0xb72decb4, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0xb72deb58, 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=0xb72de248 format= 0, activeBuffer=[ 0x 0: 0, 0], queued-frames=0, mRefreshPending=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=00, FIFO(0)={} + LayerDim 0xb72e0a58 (DimLayer) Region transparentRegion (this=0xb72e0bbc, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0xb72e0a60, 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=0xb72de248 format= 0, activeBuffer=[ 0x 0: 0, 0], queued-frames=0, mRefreshPending=0 mTexName=4 mCurrentTexture=-1 mCurrentCrop=[0,0,0,0] mCurrentTransform=0 mAbandoned=0 -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1x1], default-format=1, transform-hint=00, FIFO(0)={} + Layer 0xb72e2ec0 (FocusedStackFrame) Region transparentRegion (this=0xb72e3024, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0xb72e2ec8, count=1) [ 0, 0, 0, 0] layerStack= 0, z= 0, 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=0xb72de248 format= 1, activeBuffer=[ 0x 0: 0, 0], queued-frames=0, mRefreshPending=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=00, FIFO(0)={} + Layer 0xb72db960 (com.android.launcher/com.android.launcher2.Launcher) Region transparentRegion (this=0xb72dbac4, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0xb72db968, count=1) [ 0, 0, 0, 0] layerStack= 0, z= 21000, pos=(0,0), size=( 800,1216), crop=( 0, 0, 800,1216), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000001, tr=[1.00, 0.00][0.00, 1.00] client=0xb72e6fa8 format= 1, activeBuffer=[ 800x1216: 800, 1], queued-frames=0, mRefreshPending=0 mTexName=2 mCurrentTexture=2 mCurrentCrop=[0,0,0,0] mCurrentTransform=0 mAbandoned=0 -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[800x1216], default-format=1, transform-hint=00, FIFO(0)={} [00:0xb72d81d8] state=FREE , 0xb72e7690 [ 800x1216: 800, 1] [01:0xb72f09c0] state=FREE , 0xb72f0b00 [ 800x1216: 800, 1] >[02:0xb72f0d40] state=ACQUIRED, 0xb72f0f58 [ 800x1216: 800, 1] + Layer 0xb72e76c8 (com.android.systemui.ImageWallpaper) Region transparentRegion (this=0xb72e782c, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0xb72e76d0, count=1) [ 0, 0, 800, 1280] layerStack= 0, z= 21005, pos=(0,0), size=(1406,1280), crop=( 0, 0, 800,1280), isOpaque=1, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00] client=0xb72ddc18 format= 2, activeBuffer=[1406x1280:1406, 2], queued-frames=0, mRefreshPending=0 mTexName=8 mCurrentTexture=0 mCurrentCrop=[0,0,0,0] mCurrentTransform=0 mAbandoned=0 -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1406x1280], default-format=2, transform-hint=00, FIFO(0)={} >[00:0xb72db870] state=ACQUIRED, 0xb72f0990 [1406x1280:1406, 2] + Layer 0xb72f2998 (Keyguard) Region transparentRegion (this=0xb72f2afc, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0xb72f29a0, count=1) [ 0, 0, 800, 1280] layerStack= 0, z= 131000, pos=(0,0), size=( 800,1280), crop=( 0, 0, 800,1280), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00] client=0xb72ddc18 format= 1, activeBuffer=[ 800x1280: 800, 1], queued-frames=0, mRefreshPending=0 mTexName=11 mCurrentTexture=2 mCurrentCrop=[0,0,0,0] mCurrentTransform=0 mAbandoned=0 -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[800x1280], default-format=1, transform-hint=00, FIFO(0)={} [00:0xb72f04d8] state=FREE , 0xb72ee580 [ 800x1280: 800, 1] [01:0xb72e4da0] state=FREE , 0xb72db4d8 [ 800x1280: 800, 1] >[02:0xb72eee30] state=ACQUIRED, 0xb72f00e8 [ 800x1280: 800, 1] + Layer 0xb72ec178 (StatusBar) Region transparentRegion (this=0xb72ec2dc, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0xb72ec180, count=1) [ 0, 0, 800, 33] layerStack= 0, z= 161000, pos=(0,0), size=( 800, 33), crop=( 0, 0, 800, 33), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00] client=0xb72ddc18 format= 1, activeBuffer=[ 800x 33: 800, 1], queued-frames=0, mRefreshPending=0 mTexName=9 mCurrentTexture=2 mCurrentCrop=[0,0,0,0] mCurrentTransform=0 mAbandoned=0 -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[800x33], default-format=1, transform-hint=00, FIFO(0)={} [00:0xb72e9670] state=FREE , 0xb72e2e78 [ 800x 33: 800, 1] [01:0xb72e4e38] state=FREE , 0xb72e9900 [ 800x 33: 800, 1] >[02:0xb72e75b0] state=ACQUIRED, 0xb72ee5b0 [ 800x 33: 800, 1] + Layer 0xb72f1710 (NavigationBar) Region transparentRegion (this=0xb72f1874, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0xb72f1718, count=1) [ 0, 1216, 800, 1280] layerStack= 0, z= 201000, pos=(0,1216), size=( 800, 64), crop=( 0, 0, 800, 64), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00] client=0xb72ddc18 format= 1, activeBuffer=[ 800x 64: 800, 1], queued-frames=0, mRefreshPending=0 mTexName=10 mCurrentTexture=0 mCurrentCrop=[0,0,0,0] mCurrentTransform=0 mAbandoned=0 -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[800x64], default-format=1, transform-hint=00, FIFO(0)={} >[00:0xb72e96f0] state=ACQUIRED, 0xb72db158 [ 800x 64: 800, 1] + Layer 0xb72e5088 (StrictModeFlash) Region transparentRegion (this=0xb72e51ec, count=1) [ 0, 0, 0, 0] Region visibleRegion (this=0xb72e5090, count=1) [ 0, 0, 0, 0] layerStack= 0, z= 1010000, pos=(0,0), size=( 800,1280), crop=( 0, 0, -1, -1), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000001, tr=[1.00, 0.00][0.00, 1.00] client=0xb72de248 format= 1, activeBuffer=[ 800x1280: 800, 1], queued-frames=0, mRefreshPending=0 mTexName=6 mCurrentTexture=1 mCurrentCrop=[0,0,0,0] mCurrentTransform=0 mAbandoned=0 -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[800x1280], default-format=1, transform-hint=00, FIFO(0)={} [00:0xb72e7010] state=FREE , 0xb72e7090 [ 1x 1: 1, 1] >[01:0xb72e4cb0] state=ACQUIRED, 0xb72d9ef8 [ 800x1280: 800, 1] Displays (1 entries) + DisplayDevice: Built-in Screen type=0, hwcId=0, layerStack=0, ( 800x1280), ANativeWindow=0xb72d8d40, orient= 0 (type=00000000), flips=1108, isSecure=1, secureVis=0, acquired=1, numLayers=4 v:[0,0,800,1280], f:[0,0,800,1280], s:[0,0,800,1280],transform:[[1.000,0.000,0.000][0.000,1.000,0.000][0.000,0.000,1.000]] mAbandoned=0 -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[800x1280], default-format=4, transform-hint=00, FIFO(0)={} [00:0xb72d9dc0] state=DEQUEUED, 0xb72d9ec8 [ 800x1280: 800, 4] >[01:0xb72db0c8] state=ACQUIRED, 0xb72dae50 [ 800x1280: 800, 4] SurfaceFlinger global state: EGL implementation : 1.2 Android Driver 1.2.0 EGL_KHR_fence_sync EGL_KHR_image_base EGL_ANDROID_image_native_buffer EGL_ANDROID_swap_rectangle GLES: Android, Android PixelFlinger 1.4, OpenGL ES-CM 1.0 GL_EXT_debug_marker GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_draw_texture GL_OES_matrix_get GL_OES_query_matrix GL_OES_EGL_image GL_OES_EGL_sync GL_OES_compressed_ETC1_RGB8_texture GL_ARB_texture_compression GL_ARB_texture_non_power_of_two GL_ANDROID_user_clip_plane GL_ANDROID_vertex_buffer_object GL_ANDROID_generate_mipmap Region undefinedRegion (this=0xb72d8b54, count=1) [ 0, 0, 0, 0] orientation=0, canDraw=1 last eglSwapBuffers() time: 69.977000 us last transaction time : 507.097000 us transaction-flags : 00000000 refresh-rate : 97.656002 fps x-dpi : 165.203247 y-dpi : 165.035538 EGL_NATIVE_VISUAL_ID : 4 gpu_to_cpu_unsupported : 0 eglSwapBuffers time: 0.000000 us transaction time: 0.000000 us VSYNC state: disabled soft-vsync: disabled numListeners=6, events-delivered: 238 0xb72d9f50: count=-1 0xb72de1d8: count=-1 0xb72de6a0: count=-1 0xb72de9c8: count=-1 0xb72e5050: count=-1 0xb72e6fe8: count=-1 h/w composer state: h/w composer not present and enabled Allocated buffers: 0xb72d9ec8: 2000.00 KiB | 800 ( 800) x 1280 | 4 | 0x00001a33 0xb72d9ef8: 4000.00 KiB | 800 ( 800) x 1280 | 1 | 0x00000933 0xb72dae50: 2000.00 KiB | 800 ( 800) x 1280 | 4 | 0x00001a33 0xb72db158: 200.00 KiB | 800 ( 800) x 64 | 1 | 0x00000933 0xb72db4d8: 4000.00 KiB | 800 ( 800) x 1280 | 1 | 0x00000933 0xb72e2e78: 103.12 KiB | 800 ( 800) x 33 | 1 | 0x00000933 0xb72e7090: 0.00 KiB | 1 ( 1) x 1 | 1 | 0x00000933 0xb72e7690: 3800.00 KiB | 800 ( 800) x 1216 | 1 | 0x00000933 0xb72e9900: 103.12 KiB | 800 ( 800) x 33 | 1 | 0x00000933 0xb72ee580: 4000.00 KiB | 800 ( 800) x 1280 | 1 | 0x00000933 0xb72ee5b0: 103.12 KiB | 800 ( 800) x 33 | 1 | 0x00000933 0xb72f00e8: 4000.00 KiB | 800 ( 800) x 1280 | 1 | 0x00000933 0xb72f0990: 7030.00 KiB | 1406 (1406) x 1280 | 2 | 0x00000933 0xb72f0b00: 3800.00 KiB | 800 ( 800) x 1216 | 1 | 0x00000933 0xb72f0f58: 3800.00 KiB | 800 ( 800) x 1216 | 1 | 0x00000933 Total allocated (estimate): 38939.38 KB