Chromium Code Reviews| Index: content/browser/gpu/browser_gpu_channel_host_factory.cc |
| diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc |
| index 205542cdc81e918839841fbbeb55d99e16c6cadd..db9abc0ab776677ff862c7dbb8e1c2ef13932469 100644 |
| --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc |
| +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc |
| @@ -254,12 +254,13 @@ bool BrowserGpuChannelHostFactory::IsGpuMemoryBufferFactoryUsageEnabled( |
| } |
| // static |
| -uint32 BrowserGpuChannelHostFactory::GetImageTextureTarget() { |
| - if (!IsGpuMemoryBufferFactoryUsageEnabled(gfx::GpuMemoryBuffer::MAP)) |
| +uint32 BrowserGpuChannelHostFactory::GetImageTextureTarget( |
| + gfx::GpuMemoryBuffer::Usage usage) { |
| + if (!IsGpuMemoryBufferFactoryUsageEnabled(usage)) |
| return GL_TEXTURE_2D; |
| std::vector<gfx::GpuMemoryBufferType> supported_types; |
| - GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); |
| + GpuMemoryBufferFactory::GetSupportedTypes(usage, &supported_types); |
|
reveman
2015/05/19 16:12:12
Instead of changing GetSupportedTypes (which might
danakj
2015/05/19 20:11:52
I don't understand this request :(
IsGpuMemoryBuf
danakj
2015/05/19 22:19:43
OK thanks for the discussion about this! I've pass
|
| DCHECK(!supported_types.empty()); |
| // The GPU service will always use the preferred type. |
| @@ -473,7 +474,7 @@ bool BrowserGpuChannelHostFactory::IsGpuMemoryBufferConfigurationSupported( |
| // Preferred type is always used by factory. |
| std::vector<gfx::GpuMemoryBufferType> supported_types; |
| - GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); |
| + GpuMemoryBufferFactory::GetSupportedTypes(usage, &supported_types); |
| DCHECK(!supported_types.empty()); |
| switch (supported_types[0]) { |
| case gfx::SHARED_MEMORY_BUFFER: |