Commit 45c5c213 authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

RenderThreadImpl 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.

RenderThreadImpl is one of those call sites.

BUG=837030

Change-Id: Ia1ee9524027d512980f97d08bfc61e93536e3b26
Reviewed-on: https://chromium-review.googlesource.com/1038060Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555258}
parent 26bcc610
...@@ -419,9 +419,7 @@ class RendererLocalSurfaceIdProvider : public viz::LocalSurfaceIdProvider { ...@@ -419,9 +419,7 @@ class RendererLocalSurfaceIdProvider : public viz::LocalSurfaceIdProvider {
const viz::CompositorFrame& frame) override { const viz::CompositorFrame& frame) override {
auto new_surface_properties = auto new_surface_properties =
RenderWidgetSurfaceProperties::FromCompositorFrame(frame); RenderWidgetSurfaceProperties::FromCompositorFrame(frame);
if (!parent_local_surface_id_allocator_.GetCurrentLocalSurfaceId() if (new_surface_properties != surface_properties_) {
.is_valid() ||
new_surface_properties != surface_properties_) {
parent_local_surface_id_allocator_.GenerateId(); parent_local_surface_id_allocator_.GenerateId();
surface_properties_ = new_surface_properties; surface_properties_ = new_surface_properties;
} }
......
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