• Sadrul Habib Chowdhury's avatar
    latency: Stop using a component-id for BEGIN_RWH component. · 128d1c67
    Sadrul Habib Chowdhury authored
    The component-id for BEGIN_RWH component is currently generated from the
    process-id and routing-id of the associated RenderWidgetHostImpl, so
    that it is possible to find the RenderWidgetHostImpl from the
    LatencyInfo after gpu-swap happens. However, the BEGIN_RWH component is
    unused at that time (only LatencyInfos that have snapshot requests are
    processed after gpu-swap, and the snapshot requests already carry the
    identifier for the RenderWidgetHostImpl separately), except for in a
    test. So, the changes in this CL:
     . Use zero as the component-id for BEGIN_RWH component.
     . Introduce a SetLatencyInfoProcessorForTesting() method to install a
       callback that receives all the LatencyInfo after a gpu-swap happens,
       and use that in the tests that needed this.
    
    BUG=849729
    
    Change-Id: I19beb790931cfe8e708d0eb4223a3ba23d51e4c1
    Reviewed-on: https://chromium-review.googlesource.com/1089583Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
    Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#565488}
    128d1c67
render_widget_host_unittest.cc 104 KB