Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 6|回复: 2
打印 上一主题 下一主题

下面重点研究一下地步的nav导航条是如何

[复制链接]

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
跳转到指定楼层
楼主
发表于 2016-4-26 23:32:41 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
下面重点研究一下地步的nav导航条是如何
回复

使用道具 举报

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
沙发
 楼主| 发表于 2016-4-27 00:04:41 | 只看该作者
首先看看nav导航条是那一个buff。使用以前看到的那个debug的方法呢?
回复 支持 反对

使用道具 举报

1198

主题

2060

帖子

7058

积分

超级版主

Rank: 8Rank: 8

积分
7058
板凳
 楼主| 发表于 2016-4-27 00:42:21 | 只看该作者
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 17277124 ns)
Visible layers (count = 7)
+ LayerDim 0x5584566230 (DimLayer-0)
  Region transparentRegion (this=0x5584566410, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x5584566240, 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=0x5584561fd0
      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=[1x1], default-format=1, transform-hint=00, FIFO(0)={}
             this=0x5584567b60 (mConsumerName=DimLayer-0, mConnectedApi=0, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=3, mPid=211, producer=[-1:], consumer=[211:/system/bin/surfaceflinger])
                *BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=0), mMode=TRACK_CONSUMER
+ LayerDim 0x5584569e40 (DimLayer-0-AnimBg)
  Region transparentRegion (this=0x558456a020, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x5584569e50, 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=0x5584561fd0
      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=00, FIFO(0)={}
             this=0x558456b8f0 (mConsumerName=DimLayer-0-AnimBg, mConnectedApi=0, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=4, mPid=211, producer=[-1:], consumer=[211:/system/bin/surfaceflinger])
                *BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=0), mMode=TRACK_CONSUMER
+ Layer 0x55845a12d0 (com.android.systemui.ImageWallpaper)
  Region transparentRegion (this=0x55845a14b0, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x55845a12e0, count=1)
    [  0,   0, 1080, 1920]
      layerStack=   0, z=    21000, pos=(0,0), size=(1920,1920), crop=(   0,   0,1080,1920), isOpaque=1, invalidate=0, alpha=0xff, flags=0x00000002, tr=[1.00, 0.00][0.00, 1.00]
      client=0x558456e850
      format= 2, activeBuffer=[1920x1920:1920,  2], queued-frames=0, mRefreshPending=0
      mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
            mTexName=9 mCurrentTexture=0
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0
            mAbandoned=0
            -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1920x1920], default-format=2, transform-hint=00, FIFO(0)={}
             this=0x55845a2a90 (mConsumerName=com.android.systemui.ImageWallpaper, mConnectedApi=0, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=8, mPid=211, producer=[-1:com.android.systemui], consumer=[211:/system/bin/surfaceflinger])
                *BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
                 [00] handle=0x55845a1210, fence=0x5584561c60, time=0x3dde38025e
+ Layer 0x5584577ed0 (com.android.launcher3/com.android.launcher3.Launcher)
  Region transparentRegion (this=0x55845780b0, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x5584577ee0, count=1)
    [  0,   0, 1080, 1920]
      layerStack=   0, z=    21005, pos=(0,0), size=(1080,1920), crop=(   0,   0,1080,1920), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
      client=0x55845660f0
      format= 1, activeBuffer=[1080x1920:1088,  1], queued-frames=0, mRefreshPending=0
      mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
            mTexName=8 mCurrentTexture=0
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0
            mAbandoned=0
            -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1080x1920], default-format=1, transform-hint=00, FIFO(0)={}
             this=0x55845797b0 (mConsumerName=com.android.launcher3/com.android.launcher3.Launcher, mConnectedApi=1, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=7, mPid=211, producer=[2598:com.android.launcher3], consumer=[211:/system/bin/surfaceflinger])
            >[00:0x55845775a0] state=ACQUIRED, 0x5584577300 [1080x1920:1088,  1]
             [01:0x558457bb80] state=FREE    , 0x558457c3a0 [1080x1920:1088,  1]
             [02:0x558457c440] state=FREE    , 0x558457bd60 [1080x1920:1088,  1]
                *BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
                 [00] handle=0x5584577300, fence=0x55845fadb0, time=0x8e420eaa6c
+ Layer 0x5584562530 (FocusedStackFrame)
  Region transparentRegion (this=0x5584562710, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x5584562540, 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=0x5584561fd0
      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=00, FIFO(0)={}
             this=0x5584563cf0 (mConsumerName=FocusedStackFrame, mConnectedApi=0, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=2, mPid=211, producer=[-1:], consumer=[211:/system/bin/surfaceflinger])
                *BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=0), mMode=TRACK_CONSUMER
+ Layer 0x558456f4b0 (StatusBar)
  Region transparentRegion (this=0x558456f690, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x558456f4c0, count=1)
    [  0,   0, 1080,  33]
      layerStack=   0, z=   151000, pos=(0,0), size=(1080,  33), crop=(   0,   0,1080,  33), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
      client=0x558456e850
      format= 1, activeBuffer=[1080x  33:1088,  1], queued-frames=0, mRefreshPending=0
      mSecure=0, mProtectedByApp=0, mFiltering=0, mNeedsFiltering=0
            mTexName=6 mCurrentTexture=1
            mCurrentCrop=[0,0,0,0] mCurrentTransform=0
            mAbandoned=0
            -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1080x33], default-format=1, transform-hint=00, FIFO(0)={}
             this=0x5584570c70 (mConsumerName=StatusBar, mConnectedApi=1, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=5, mPid=211, producer=[2043:com.android.systemui], consumer=[211:/system/bin/surfaceflinger])
             [00:0x558462de10] state=FREE    , 0x55845650e0 [1080x  33:1088,  1]
            >[01:0x5584502c60] state=ACQUIRED, 0x5584566050 [1080x  33:1088,  1]
             [02:0x55847a7c50] state=FREE    , 0x558470cac0 [1080x  33:1088,  1]
                *BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
                 [00] handle=0x5584566050, fence=0x558456e970, time=0x9aa95497c1
+ Layer 0x558478ceb0 (NavigationBar)
  Region transparentRegion (this=0x558478d090, count=1)
    [  0,   0,   0,   0]
  Region visibleRegion (this=0x558478cec0, count=1)
    [  0, 1857, 1080, 1920]
      layerStack=   0, z=   201000, pos=(0,1857), size=(1080,  63), crop=(   0,   0,1080,  63), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
      client=0x558456e850
      format= 1, activeBuffer=[1080x  63: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=0
            mAbandoned=0
            -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1080x63], default-format=1, transform-hint=00, FIFO(0)={}
             this=0x5584785e40 (mConsumerName=NavigationBar, mConnectedApi=1, mConsumerUsageBits=0x900, mOverrideMaxBufferCount=0, mId=40, mPid=211, producer=[2043:com.android.systemui], consumer=[211:/system/bin/surfaceflinger])
            >[00:0x55846598f0] state=ACQUIRED, 0x5584558d80 [1080x  63:1088,  1]
             [01:0x55845771e0] state=FREE    , 0x558468ee10 [1080x  63:1088,  1]
             [02:0x55844fb9c0] state=FREE    , 0x55845bd4a0 [1080x  63:1088,  1]
                *BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
                 [00] handle=0x5584558d80, fence=0x5584577cb0, time=0x8e3a941b51
Displays (1 entries)
+ DisplayDevice: Built-in Screen
   type=0, hwcId=0, layerStack=0, (1080x1920), ANativeWindow=0x5584548b00, orient= 0 (type=00000000), flips=4310, isSecure=1, secureVis=0, powerMode=2, activeConfig=0, numLayers=4
   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]]
   hworient= 0, mirror=-1
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1080x1920], default-format=1, transform-hint=00, FIFO(0)={}
this=0x5584546ae0 (mConsumerName=FrameBufferSurface_0, mConnectedApi=1, mConsumerUsageBits=0x1a00, mOverrideMaxBufferCount=0, mId=0, mPid=211, producer=[211:/system/bin/surfaceflinger], consumer=[211:/system/bin/surfaceflinger])
>[00:0x5584550480] state=ACQUIRED, 0x5584550570 [1080x1920:1088,  1]
[01:0x55846a7480] state=FREE    , 0x558471e220 [1080x1920:1088,  1]
[02:0x558454fb40] state=FREE    , 0x558462e0d0 [1080x1920:1088,  1]
    *BufferQueueDump mIsBackupBufInited=0, mAcquiredBufs(size=1), mMode=TRACK_CONSUMER
     [00] handle=0x5584550570, fence=0x55846a7b10, time=0x8e2801c122
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=0x5584548828, count=1)
    [  0,   0,   0,   0]
  orientation=0, isDisplayOn=1
  last eglSwapBuffers() time: 2982.693000 us
  last transaction time     : 313.769000 us
  transaction-flags         : 00000000
  refresh-rate              : 57.880004 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=8,
  events-delivered: 5265
    0x55845028e0: count=-1
    0x5584502a60: count=-1
    0x5584561a10: count=-1
    0x55845620e0: count=-1
    0x558456e360: count=-1
    0x558456e3b0: count=-1
    0x558456e780: count=-1
    0x5584574da0: 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=17277124
  numHwLayers=5, flags=00000000
    type   |  handle  | hint | flag | tr | blnd |   format    |     source crop (l,t,r,b)      |          frame         | name
-----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------
       HWC | 55845a1210 | 0002 | 0000 | 00 | 0100 | RGBx_8888   |    0.0,    0.0, 1080.0, 1920.0 |    0,    0, 1080, 1920 | com.android.systemui.ImageWallpaper
       HWC | 5584577300 | 0002 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1080.0, 1920.0 |    0,    0, 1080, 1920 | com.android.launcher3/com.android.launcher3.Launcher
       HWC | 5584566050 | 0002 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1080.0,   33.0 |    0,    0, 1080,   33 | StatusBar
       HWC | 5584558d80 | 0002 | 0000 | 00 | 0105 | RGBA_8888   |    0.0,    0.0, 1080.0,   63.0 |    0, 1857, 1080, 1920 | NavigationBar
FB TARGET | 5584550570 | 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=0 y=0 w=1080 h=1920
  (1) f=0x1 x=0 y=0 w=1080 h=1920
  (2) f=0x1 x=0 y=0 w=1080 h=33
  (3) f=0x1 x=0 y=1857 w=1080 h=63
  Total size: 17003520 bytes

Allocated buffers:
0x5584550570: 8160.00 KiB | 1080 (1088) x 1920 |        1 | 0x00001a00
0x5584551090: 8160.00 KiB | 1080 (1088) x 1920 |        1 | 0x00000b00
0x5584558d80:  267.75 KiB | 1080 (1088) x   63 |        1 | 0x00000b00
0x55845650e0:  140.25 KiB | 1080 (1088) x   33 |        1 | 0x00000b00
0x5584566050:  140.25 KiB | 1080 (1088) x   33 |        1 | 0x00000b00
0x5584577300: 8160.00 KiB | 1080 (1088) x 1920 |        1 | 0x00000b00
0x558457bd60: 8160.00 KiB | 1080 (1088) x 1920 |        1 | 0x00000b00
0x558457c3a0: 8160.00 KiB | 1080 (1088) x 1920 |        1 | 0x00000b00
0x55845a1210: 14400.00 KiB | 1920 (1920) x 1920 |        2 | 0x00000b00
0x55845bd4a0:  267.75 KiB | 1080 (1088) x   63 |        1 | 0x00000b00
0x558462e0d0: 8160.00 KiB | 1080 (1088) x 1920 |        1 | 0x00001a00
0x558468ee10:  267.75 KiB | 1080 (1088) x   63 |        1 | 0x00000b00
0x558470cac0:  140.25 KiB | 1080 (1088) x   33 |        1 | 0x00000b00
0x558471e220: 8160.00 KiB | 1080 (1088) x 1920 |        1 | 0x00001a00
Total allocated (estimate): 72744.00 KB
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, 2025-12-15 02:00 , Processed in 0.015538 second(s), 8 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表