Commit 28419426 authored by Ricky Liang's avatar Ricky Liang Committed by Commit Bot

Don't declare GpuMemoryBuffer-based VideoFrame mappable

Bug: 982201, 997581
Change-Id: Ida6c3e961a5bd23d89a8c19d74d7ce05a96a3f1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1804195
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697080}
parent 82cc43e8
...@@ -77,11 +77,14 @@ bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { ...@@ -77,11 +77,14 @@ bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) {
// level, DmaBufs are not mappable from userspace. // level, DmaBufs are not mappable from userspace.
storage_type != VideoFrame::STORAGE_DMABUFS && storage_type != VideoFrame::STORAGE_DMABUFS &&
#endif #endif
// GpuMemoryBuffer is not mappable at VideoFrame level. In most places
// GpuMemoryBuffer is opaque to the CPU, and for places that really need
// to access the data on CPU they can get the buffer with
// GetGpuMemoryBuffer() and call gfx::GpuMemoryBuffer::Map().
(storage_type == VideoFrame::STORAGE_UNOWNED_MEMORY || (storage_type == VideoFrame::STORAGE_UNOWNED_MEMORY ||
storage_type == VideoFrame::STORAGE_OWNED_MEMORY || storage_type == VideoFrame::STORAGE_OWNED_MEMORY ||
storage_type == VideoFrame::STORAGE_SHMEM || storage_type == VideoFrame::STORAGE_SHMEM ||
storage_type == VideoFrame::STORAGE_MOJO_SHARED_BUFFER || storage_type == VideoFrame::STORAGE_MOJO_SHARED_BUFFER);
storage_type == VideoFrame::STORAGE_GPU_MEMORY_BUFFER);
} }
// Checks if |source_format| can be wrapped into a |target_format| frame. // Checks if |source_format| can be wrapped into a |target_format| frame.
......
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