Commit 0a8e95b3 authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

Blink's platform/graphics 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.

Blink's platform/graphics have some of those call sites.

BUG=837030

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie8ec4f6d09e357e9433e583e0a79abb72de73385
Reviewed-on: https://chromium-review.googlesource.com/1038140Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555243}
parent 7f9eaa8b
...@@ -47,7 +47,8 @@ OffscreenCanvasFrameDispatcher::OffscreenCanvasFrameDispatcher( ...@@ -47,7 +47,8 @@ OffscreenCanvasFrameDispatcher::OffscreenCanvasFrameDispatcher(
if (frame_sink_id_.is_valid()) { if (frame_sink_id_.is_valid()) {
// Only frameless canvas pass an invalid frame sink id; we don't create // Only frameless canvas pass an invalid frame sink id; we don't create
// mojo channel for this special case. // mojo channel for this special case.
current_local_surface_id_ = parent_local_surface_id_allocator_.GenerateId(); current_local_surface_id_ =
parent_local_surface_id_allocator_.GetCurrentLocalSurfaceId();
DCHECK(!sink_.is_bound()); DCHECK(!sink_.is_bound());
mojom::blink::OffscreenCanvasProviderPtr provider; mojom::blink::OffscreenCanvasProviderPtr provider;
Platform::Current()->GetInterfaceProvider()->GetInterface( Platform::Current()->GetInterfaceProvider()->GetInterface(
......
...@@ -25,7 +25,8 @@ VideoFrameSubmitter::VideoFrameSubmitter( ...@@ -25,7 +25,8 @@ VideoFrameSubmitter::VideoFrameSubmitter(
resource_provider_(std::move(resource_provider)), resource_provider_(std::move(resource_provider)),
is_rendering_(false), is_rendering_(false),
weak_ptr_factory_(this) { weak_ptr_factory_(this) {
current_local_surface_id_ = parent_local_surface_id_allocator_.GenerateId(); current_local_surface_id_ =
parent_local_surface_id_allocator_.GetCurrentLocalSurfaceId();
DETACH_FROM_THREAD(media_thread_checker_); DETACH_FROM_THREAD(media_thread_checker_);
} }
......
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