0

Fix DCHECK in SharedImageInterfaceProxy::CreateSharedImage

In the new per-plane-binding path, we call CreateSharedImage for
a YUV_420_BIPLANAR's UV plane. The function DCHECKs that
gpu::IsImageSizeValidForGpuMemoryBufferFormat. But the DCHECK is done
specifying the format YUV_420_BIPLANAR (which has the restriction that
width be even), instead of the plane's format of RG_88 (which has no
such restriction).

Bug: 1173132
Change-Id: I168c7dfd5f1feb81c42de294a8f9773f9632891d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3017259
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#900256}
This commit is contained in:
Christopher Cameron
2021-07-10 03:43:08 +00:00
committed by Chromium LUCI CQ
parent 0415967231
commit 9968579623

@ -186,8 +186,8 @@ Mailbox SharedImageInterfaceProxy::CreateSharedImage(
params->alpha_type = alpha_type;
// TODO(piman): DCHECK GMB format support.
DCHECK(gpu::IsImageSizeValidForGpuMemoryBufferFormat(params->size,
params->format));
DCHECK(gpu::IsImageSizeValidForGpuMemoryBufferFormat(
params->size, gpu::GetPlaneBufferFormat(params->plane, params->format)));
bool requires_sync_token =
params->buffer_handle.type == gfx::IO_SURFACE_BUFFER;