| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 | 99 |
| 100 switch (GetNativeGpuMemoryBufferType()) { | 100 switch (GetNativeGpuMemoryBufferType()) { |
| 101 case gfx::NATIVE_PIXMAP: | 101 case gfx::NATIVE_PIXMAP: |
| 102 // GPU memory buffers that are shared with the GL using EGLImages | 102 // GPU memory buffers that are shared with the GL using EGLImages |
| 103 // require TEXTURE_EXTERNAL_OES. | 103 // require TEXTURE_EXTERNAL_OES. |
| 104 return GL_TEXTURE_EXTERNAL_OES; | 104 return GL_TEXTURE_EXTERNAL_OES; |
| 105 case gfx::IO_SURFACE_BUFFER: | 105 case gfx::IO_SURFACE_BUFFER: |
| 106 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB. | 106 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB. |
| 107 return GL_TEXTURE_RECTANGLE_ARB; | 107 return GL_TEXTURE_RECTANGLE_ARB; |
| 108 case gfx::DXGI_HANDLE: |
| 108 case gfx::SHARED_MEMORY_BUFFER: | 109 case gfx::SHARED_MEMORY_BUFFER: |
| 109 case gfx::EMPTY_BUFFER: | 110 case gfx::EMPTY_BUFFER: |
| 110 break; | 111 break; |
| 111 } | 112 } |
| 112 NOTREACHED(); | 113 NOTREACHED(); |
| 113 return GL_TEXTURE_2D; | 114 return GL_TEXTURE_2D; |
| 114 #else // defined(USE_OZONE) || defined(OS_MACOSX) | 115 #else // defined(USE_OZONE) || defined(OS_MACOSX) |
| 115 return GL_TEXTURE_2D; | 116 return GL_TEXTURE_2D; |
| 116 #endif | 117 #endif |
| 117 } | 118 } |
| 118 | 119 |
| 119 } // namespace gpu | 120 } // namespace gpu |
| OLD | NEW |