Commit a72ffe5f authored by Saman Sami's avatar Saman Sami Committed by Commit Bot

viz: Use child sequence number from parent if embed token changes

If the first LocalSurfaceId provided by the parent has a child sequence
number greater than 1, we should use that number. This is a speculative
fix for https://crbug.com/1051625

Bug: 1051625,1043109
Change-Id: I8b5fb86d42aa6e087e64c9e86a1de703e0b74723
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2092417
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Reviewed-by: default avatarJonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749370}
parent 67c11432
...@@ -72,10 +72,13 @@ bool ChildLocalSurfaceIdAllocator::UpdateFromParent( ...@@ -72,10 +72,13 @@ bool ChildLocalSurfaceIdAllocator::UpdateFromParent(
parent_local_surface_id_allocation.allocation_time(); parent_local_surface_id_allocation.allocation_time();
} }
// If embed token has changed, accept all fields from the parent
// including child sequence number.
if (current_local_surface_id.embed_token() != if (current_local_surface_id.embed_token() !=
parent_allocated_local_surface_id.embed_token()) { parent_allocated_local_surface_id.embed_token()) {
current_local_surface_id_allocation_.local_surface_id_ current_local_surface_id_allocation_.local_surface_id_
.child_sequence_number_ = 1; .child_sequence_number_ =
parent_allocated_local_surface_id.child_sequence_number_;
} }
current_local_surface_id_allocation_.local_surface_id_ current_local_surface_id_allocation_.local_surface_id_
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment