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

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

Issue 2970353002: Add GpuMemoryBuffer support for DXGI handles.
Patch Set: update build config Created 3 years, 4 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
« no previous file with comments | « no previous file | gpu/ipc/service/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | gpu/ipc/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698