Commit 80ac98b9 authored by Henrik Boström's avatar Henrik Boström Committed by Commit Bot

[macOS Capture] Remove CHECKs that were temporarily added recently.

The investigation of https://crbug.com/1148964 has concluded, the bug
fixed, and this crash is no longer reproducible. Cleaning up these
CHECKs that were added during the investigatiton of that issue.

Bug: chromium:1148964
Change-Id: I45cd82bcfd8ec12c455927cd12f622e09f895e70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2552398Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarMarkus Handell <handellm@google.com>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830165}
parent d2d31dbd
...@@ -682,28 +682,11 @@ void VideoCaptureImpl::OnBufferReady( ...@@ -682,28 +682,11 @@ void VideoCaptureImpl::OnBufferReady(
// The GpuMemoryBuffer is allocated and owned by the video capture // The GpuMemoryBuffer is allocated and owned by the video capture
// buffer pool from the video capture service process, so we don't need // buffer pool from the video capture service process, so we don't need
// to destroy the GpuMemoryBuffer here. // to destroy the GpuMemoryBuffer here.
gfx::GpuMemoryBufferHandle handle =
buffer_context->TakeGpuMemoryBufferHandle();
#if defined(OS_MAC)
gfx::ScopedIOSurface io_surface = handle.io_surface;
#endif
auto gmb = auto gmb =
gpu_memory_buffer_support_->CreateGpuMemoryBufferImplFromHandle( gpu_memory_buffer_support_->CreateGpuMemoryBufferImplFromHandle(
std::move(handle), gfx::Size(info->coded_size), gfx_format, buffer_context->TakeGpuMemoryBufferHandle(),
gfx::Size(info->coded_size), gfx_format,
gfx::BufferUsage::SCANOUT_VEA_CPU_READ, base::DoNothing()); gfx::BufferUsage::SCANOUT_VEA_CPU_READ, base::DoNothing());
#if defined(OS_MAC)
if (!gmb) {
// CHECK-crash happens below because gmb is null here.
// These additional CHECKs were added to aid investigations of
// https://crbug.com/1148964.
// TODO(https://crbug.com/1148964): When the referenced bug is
// resolved, delete these CHECKs.
CHECK(io_surface)
<< "GMB could not be created because io_surface is null";
CHECK(false)
<< "GMB could not be created even though io_surface is not null";
}
#endif
buffer_context->SetGpuMemoryBuffer(std::move(gmb)); buffer_context->SetGpuMemoryBuffer(std::move(gmb));
} }
CHECK(buffer_context->GetGpuMemoryBuffer()); CHECK(buffer_context->GetGpuMemoryBuffer());
......
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