Commit 54ae26ac authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Mac capture: Use SHARED_IMAGE_USAGE_MACOS_VIDEO_TOOLBOX

GpuMemoryBuffers from capture are backed by CVPixelBuffers, which
need to be specially annotated because their IOSurfaces will always
report IOSurfaceIsInUse as true. The MACOS_VIDEO_TOOLBOX usage flag
can be used to indicate that IOSurfaceIsInUse is not usable.

Bug: 1125879
Change-Id: I9cdcb57d6c47a8ac0aa5cd3bb120b7b91113a508
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2409215Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806561}
parent be880fb8
......@@ -142,7 +142,8 @@ struct VideoCaptureImpl::BufferContext
if (buffer_context->gmb_resources_->mailbox.IsZero()) {
uint32_t usage =
gpu::SHARED_IMAGE_USAGE_GLES2 | gpu::SHARED_IMAGE_USAGE_RASTER |
gpu::SHARED_IMAGE_USAGE_DISPLAY | gpu::SHARED_IMAGE_USAGE_SCANOUT;
gpu::SHARED_IMAGE_USAGE_DISPLAY | gpu::SHARED_IMAGE_USAGE_SCANOUT |
gpu::SHARED_IMAGE_USAGE_MACOS_VIDEO_TOOLBOX;
buffer_context->gmb_resources_->mailbox = sii->CreateSharedImage(
gpu_memory_buffer.get(),
buffer_context->gpu_factories_->GpuMemoryBufferManager(),
......
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