Added assert for host buffer allocation. (flutter/engine#55395)
fixes https://github.com/flutter/flutter/issues/155555 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
@@ -29,7 +29,9 @@ HostBuffer::HostBuffer(const std::shared_ptr<Allocator>& allocator)
|
||||
desc.size = kAllocatorBlockSize;
|
||||
desc.storage_mode = StorageMode::kHostVisible;
|
||||
for (auto i = 0u; i < kHostBufferArenaSize; i++) {
|
||||
device_buffers_[i].push_back(allocator->CreateBuffer(desc));
|
||||
std::shared_ptr<DeviceBuffer> device_buffer = allocator->CreateBuffer(desc);
|
||||
FML_CHECK(device_buffer) << "Failed to allocate device buffer.";
|
||||
device_buffers_[i].push_back(device_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user