| Index: services/ui/common/mus_gpu_memory_buffer_manager.cc
|
| diff --git a/services/ui/common/mus_gpu_memory_buffer_manager.cc b/services/ui/common/mus_gpu_memory_buffer_manager.cc
|
| index 6158144de0c2e3e67d6667a68e0ac7233dd35644..4e3b63a86300d01d4a9d3aeb40ee4124ac2a12d2 100644
|
| --- a/services/ui/common/mus_gpu_memory_buffer_manager.cc
|
| +++ b/services/ui/common/mus_gpu_memory_buffer_manager.cc
|
| @@ -15,7 +15,10 @@ namespace ui {
|
| MusGpuMemoryBufferManager::MusGpuMemoryBufferManager(
|
| mojom::GpuServiceInternal* gpu_service,
|
| int client_id)
|
| - : gpu_service_(gpu_service), client_id_(client_id), weak_factory_(this) {}
|
| + : gpu_service_(gpu_service),
|
| + client_id_(client_id),
|
| + native_configurations_(gpu::GetNativeGpuMemoryBufferConfigurations()),
|
| + weak_factory_(this) {}
|
|
|
| MusGpuMemoryBufferManager::~MusGpuMemoryBufferManager() {}
|
|
|
| @@ -29,8 +32,8 @@ MusGpuMemoryBufferManager::CreateGpuMemoryBufferHandle(
|
| gpu::SurfaceHandle surface_handle) {
|
| DCHECK(CalledOnValidThread());
|
| if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) {
|
| - const bool is_native =
|
| - gpu::IsNativeGpuMemoryBufferConfigurationSupported(format, usage);
|
| + const bool is_native = native_configurations_.find(std::make_pair(
|
| + format, usage)) != native_configurations_.end();
|
| if (is_native) {
|
| gfx::GpuMemoryBufferHandle handle;
|
| gpu_service_->CreateGpuMemoryBuffer(id, size, format, usage, client_id,
|
|
|