Commit 9ba0c59a authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

LocalSurfaceIdProvider to use default LSI

Previously, ParentLocalSurfaceIdAllocator would default to an invalid
LocalSurfaceId. A new LSI had to be explicitly allocated before the
normal behavior could use it.

With ParentLocalSurfaceIdAllocator now default initializing a valid LSI,
the various call sites no longer need to explicitly check for the
uninitialized state.

LocalSurfaceIdProvider is one of those call sites.

BUG=837030

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: Ifec19249e74d2a705b54fec4d5d350ee435d87b0
Reviewed-on: https://chromium-review.googlesource.com/1036794
Commit-Queue: Chris Blume <cblume@chromium.org>
Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555218}
parent dd2d3eff
...@@ -16,9 +16,7 @@ DefaultLocalSurfaceIdProvider::DefaultLocalSurfaceIdProvider() = default; ...@@ -16,9 +16,7 @@ DefaultLocalSurfaceIdProvider::DefaultLocalSurfaceIdProvider() = default;
const LocalSurfaceId& DefaultLocalSurfaceIdProvider::GetLocalSurfaceIdForFrame( const LocalSurfaceId& DefaultLocalSurfaceIdProvider::GetLocalSurfaceIdForFrame(
const CompositorFrame& frame) { const CompositorFrame& frame) {
if (!parent_local_surface_id_allocator_.GetCurrentLocalSurfaceId() if (frame.size_in_pixels() != surface_size_ ||
.is_valid() ||
surface_size_ != frame.size_in_pixels() ||
frame.device_scale_factor() != device_scale_factor_) { frame.device_scale_factor() != device_scale_factor_) {
parent_local_surface_id_allocator_.GenerateId(); parent_local_surface_id_allocator_.GenerateId();
} }
......
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