• danakj's avatar
    viz: Make SharedBitmap tracing consistent and more clear · cf885171
    danakj authored
    Make SharedBitmap return an UnguessableToken as the shared bitmap-based
    tracing id, if the SharedBitmap is in fact backed by shared memory for
    cross-process use. This means ClientSharedBitmapManager always does
    and ServerSharedBitmapManager returns null if the bitmap was allocated
    inside the ServerSharedBitmapManager.
    
    In ServerSharedBitmapManager memory dumps, if a bitmap is shared memory
    backed, it dumps the |mapped_id()| which is the UnguessableToken.
    Otherwise, it dumps the SharedBitmapGUID from the SharedBitmapId.
    
    In ResourceProvider, if the SharedBitmap has an UnguessableToken for
    its shared memory backing, it dumps that, else uses the SharedBitmapID
    to make a GUID.
    
    In ResourcePool, the same thing is done as ResourceProvider.
    
    Thus, all child-process bitmaps will be dumped via the shared memory
    mapped_id() which is an UnguessableToken. And all service-process
    bitmaps are dumped via the SharedBitmapGUID.
    
    R=ericrk@chromium.org
    
    Bug: 730660
    Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
    Change-Id: Id4b1c20350a139d36df13743d012756181937c6e
    Reviewed-on: https://chromium-review.googlesource.com/935428
    Commit-Queue: danakj <danakj@chromium.org>
    Reviewed-by: default avatarEric Karl <ericrk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#541275}
    cf885171
resource_provider.cc 10.1 KB