Commit f3be338f authored by Markus Handell's avatar Markus Handell Committed by Commit Bot

VideoCaptureImpl: fix DCHECK in sync_token_mojom_traits.h.

Due to an old copy-paste error, incoming captured NV12 GMB
frames in VideoCaptureImpl were equipped with mailboxes
containing a SyncToken meant for use inside contexts
that shares the same IPC channel with the context that
generates the sync token.
It was missed due to CrOS not run with DCHECKs on for a
while and was encountered late in the developments for
macOS zero-copy capture.

This CL fixes this by getting a verified sync token instead.

Tested: local mac test with H264 HW encode with 0c path capture.
Bug: 1147356
Change-Id: I539806eb2577ef1869bb308428bfa68157ac1a21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531013Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Reviewed-by: default avatarSunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: default avatarRicky Liang <jcliang@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/master@{#827222}
parent 59c8a0bc
...@@ -174,7 +174,7 @@ struct VideoCaptureImpl::BufferContext ...@@ -174,7 +174,7 @@ struct VideoCaptureImpl::BufferContext
sii->UpdateSharedImage(buffer_context->gmb_resources_->release_sync_token, sii->UpdateSharedImage(buffer_context->gmb_resources_->release_sync_token,
buffer_context->gmb_resources_->mailbox); buffer_context->gmb_resources_->mailbox);
} }
gpu::SyncToken sync_token = sii->GenUnverifiedSyncToken(); gpu::SyncToken sync_token = sii->GenVerifiedSyncToken();
CHECK(!buffer_context->gmb_resources_->mailbox.IsZero()); CHECK(!buffer_context->gmb_resources_->mailbox.IsZero());
CHECK(buffer_context->gmb_resources_->mailbox.IsSharedImage()); CHECK(buffer_context->gmb_resources_->mailbox.IsSharedImage());
gpu::MailboxHolder mailbox_holder_array[media::VideoFrame::kMaxPlanes]; gpu::MailboxHolder mailbox_holder_array[media::VideoFrame::kMaxPlanes];
......
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