| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 switch (GetNativeGpuMemoryBufferType()) { | 94 switch (GetNativeGpuMemoryBufferType()) { |
| 95 case gfx::NATIVE_PIXMAP: | 95 case gfx::NATIVE_PIXMAP: |
| 96 // GPU memory buffers that are shared with the GL using EGLImages | 96 // GPU memory buffers that are shared with the GL using EGLImages |
| 97 // require TEXTURE_EXTERNAL_OES. | 97 // require TEXTURE_EXTERNAL_OES. |
| 98 return GL_TEXTURE_EXTERNAL_OES; | 98 return GL_TEXTURE_EXTERNAL_OES; |
| 99 case gfx::IO_SURFACE_BUFFER: | 99 case gfx::IO_SURFACE_BUFFER: |
| 100 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB. | 100 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB. |
| 101 return GL_TEXTURE_RECTANGLE_ARB; | 101 return GL_TEXTURE_RECTANGLE_ARB; |
| 102 case gfx::DXGI_HANDLE: |
| 102 case gfx::SHARED_MEMORY_BUFFER: | 103 case gfx::SHARED_MEMORY_BUFFER: |
| 103 case gfx::EMPTY_BUFFER: | 104 case gfx::EMPTY_BUFFER: |
| 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 |