Commit 3b88daf0 authored by Justin Novosad's avatar Justin Novosad Committed by Commit Bot

Fix defective sync token logic in OffscreenCanvasResourceProvider

When resource type is an AcceleratedStaticBitmapImage, the
WaitSyncTokenCHROMIUM call in the release callback is skipped because the
context_provider_wrapper_ is null. This change fixes the problem by setting
the context_provider_wrapper_ field of the frame resource to the same context
that own the image resource.

BUG=769161

Change-Id: Ib05a0fa5a6a0d4dab676fcc27820d1171260a25d
Reviewed-on: https://chromium-review.googlesource.com/685380Reviewed-by: default avatarOlivia Lai <xlai@chromium.org>
Commit-Queue: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505388}
parent 0b758e23
...@@ -165,6 +165,7 @@ void OffscreenCanvasResourceProvider:: ...@@ -165,6 +165,7 @@ void OffscreenCanvasResourceProvider::
std::unique_ptr<FrameResource> frame_resource = std::unique_ptr<FrameResource> frame_resource =
CreateOrRecycleFrameResource(); CreateOrRecycleFrameResource();
frame_resource->context_provider_wrapper_ = image->ContextProviderWrapper();
frame_resource->image_ = std::move(image); frame_resource->image_ = std::move(image);
resources_.insert(next_resource_id_, std::move(frame_resource)); resources_.insert(next_resource_id_, std::move(frame_resource));
} }
......
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