Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: gpu/ipc/host/gpu_memory_buffer_support.cc

Issue 2970353002: Add GpuMemoryBuffer support for DXGI handles.
Patch Set: add image texture target Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | gpu/ipc/service/BUILD.gn » ('j') | gpu/ipc/service/gpu_memory_buffer_factory_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698