Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/ipc/host/gpu_memory_buffer_support.h" | 5 #include "gpu/ipc/host/gpu_memory_buffer_support.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "gpu/ipc/common/gpu_memory_buffer_support.h" | 10 #include "gpu/ipc/common/gpu_memory_buffer_support.h" |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 #endif | 32 #endif |
| 33 } | 33 } |
| 34 | 34 |
| 35 GpuMemoryBufferConfigurationSet GetNativeGpuMemoryBufferConfigurations() { | 35 GpuMemoryBufferConfigurationSet GetNativeGpuMemoryBufferConfigurations() { |
| 36 GpuMemoryBufferConfigurationSet configurations; | 36 GpuMemoryBufferConfigurationSet configurations; |
| 37 | 37 |
| 38 #if defined(USE_OZONE) || defined(OS_MACOSX) | 38 #if defined(USE_OZONE) || defined(OS_MACOSX) |
| 39 if (AreNativeGpuMemoryBuffersEnabled()) { | 39 if (AreNativeGpuMemoryBuffersEnabled()) { |
| 40 const gfx::BufferFormat kNativeFormats[] = { | 40 const gfx::BufferFormat kNativeFormats[] = { |
| 41 gfx::BufferFormat::R_8, gfx::BufferFormat::RG_88, | 41 gfx::BufferFormat::R_8, gfx::BufferFormat::RG_88, |
| 42 gfx::BufferFormat::R_16, gfx::BufferFormat::R_16, | |
|
aleksandar.stojiljkovic
2017/06/07 20:11:55
typo here? No need to have it twice.
| |
| 42 gfx::BufferFormat::BGR_565, gfx::BufferFormat::RGBA_4444, | 43 gfx::BufferFormat::BGR_565, gfx::BufferFormat::RGBA_4444, |
| 43 gfx::BufferFormat::RGBA_8888, gfx::BufferFormat::BGRA_8888, | 44 gfx::BufferFormat::RGBA_8888, gfx::BufferFormat::BGRA_8888, |
| 44 gfx::BufferFormat::RGBA_F16, gfx::BufferFormat::UYVY_422, | 45 gfx::BufferFormat::RGBA_F16, gfx::BufferFormat::UYVY_422, |
| 45 gfx::BufferFormat::YVU_420, gfx::BufferFormat::YUV_420_BIPLANAR}; | 46 gfx::BufferFormat::YVU_420, gfx::BufferFormat::YUV_420_BIPLANAR}; |
| 46 const gfx::BufferUsage kNativeUsages[] = { | 47 const gfx::BufferUsage kNativeUsages[] = { |
| 47 gfx::BufferUsage::GPU_READ, gfx::BufferUsage::SCANOUT, | 48 gfx::BufferUsage::GPU_READ, gfx::BufferUsage::SCANOUT, |
| 48 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE, | 49 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE, |
| 49 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT}; | 50 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT}; |
| 50 for (auto format : kNativeFormats) { | 51 for (auto format : kNativeFormats) { |
| 51 for (auto usage : kNativeUsages) { | 52 for (auto usage : kNativeUsages) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 break; | 105 break; |
| 105 } | 106 } |
| 106 NOTREACHED(); | 107 NOTREACHED(); |
| 107 return GL_TEXTURE_2D; | 108 return GL_TEXTURE_2D; |
| 108 #else // defined(USE_OZONE) || defined(OS_MACOSX) | 109 #else // defined(USE_OZONE) || defined(OS_MACOSX) |
| 109 return GL_TEXTURE_2D; | 110 return GL_TEXTURE_2D; |
| 110 #endif | 111 #endif |
| 111 } | 112 } |
| 112 | 113 |
| 113 } // namespace gpu | 114 } // namespace gpu |
| OLD | NEW |