• Fady Samuel's avatar
    Surface Synchronization: Avoid spurious commits · d7925401
    Fady Samuel authored
    Prior to this CL, an impl-side child allocated LocalSurfaceId would cause
    a spurious commit on the main thread as the new LocalSurfaceId propagates its
    way back to the main thread from the parent renderer.
    
    LayerTreeHost::SetLocalSurfaceIdFromParent really only cares about changes
    to the parent_sequence_number and embed_token to propagate to the impl thread.
    Other changes are irrelevant and should not cause commits.
    
    This CL fixes the issue by early exiting in
    LayerTreeHost::SetLocalSurfaceIdFromParent. This problem was cause by looking
    at SurfaceId flows. This will likely improve scrolling performance a bit on
    Android.
    
    Bug: 672962
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
    Change-Id: Ide4f9df9d89c70216e9a54dfc6ccd298cf046821
    Reviewed-on: https://chromium-review.googlesource.com/1126325Reviewed-by: default avatarSaman Sami <samans@chromium.org>
    Commit-Queue: Fady Samuel <fsamuel@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#572622}
    d7925401
layer_tree_host_unittest.cc 296 KB