OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 5 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 return GL_TEXTURE_2D; | 239 return GL_TEXTURE_2D; |
240 } | 240 } |
241 | 241 |
242 switch (GpuMemoryBufferFactory::GetNativeType()) { | 242 switch (GpuMemoryBufferFactory::GetNativeType()) { |
243 case gfx::SURFACE_TEXTURE_BUFFER: | 243 case gfx::SURFACE_TEXTURE_BUFFER: |
244 case gfx::OZONE_NATIVE_PIXMAP: | 244 case gfx::OZONE_NATIVE_PIXMAP: |
245 // GPU memory buffers that are shared with the GL using EGLImages | 245 // GPU memory buffers that are shared with the GL using EGLImages |
246 // require TEXTURE_EXTERNAL_OES. | 246 // require TEXTURE_EXTERNAL_OES. |
247 return GL_TEXTURE_EXTERNAL_OES; | 247 return GL_TEXTURE_EXTERNAL_OES; |
248 case gfx::IO_SURFACE_BUFFER: | 248 case gfx::IO_SURFACE_BUFFER: |
249 if (format == gfx::BufferFormat::YUV_420_BIPLANAR) | |
reveman
2016/01/25 18:50:55
Remove this change as discussed.
Daniele Castagna
2016/01/25 20:49:01
Done.
| |
250 return GL_TEXTURE_2D; | |
249 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB. | 251 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB. |
250 return GL_TEXTURE_RECTANGLE_ARB; | 252 return GL_TEXTURE_RECTANGLE_ARB; |
251 case gfx::SHARED_MEMORY_BUFFER: | 253 case gfx::SHARED_MEMORY_BUFFER: |
252 return GL_TEXTURE_2D; | 254 return GL_TEXTURE_2D; |
253 case gfx::EMPTY_BUFFER: | 255 case gfx::EMPTY_BUFFER: |
254 NOTREACHED(); | 256 NOTREACHED(); |
255 return GL_TEXTURE_2D; | 257 return GL_TEXTURE_2D; |
256 } | 258 } |
257 | 259 |
258 NOTREACHED(); | 260 NOTREACHED(); |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
747 return gpu_client_tracing_id_; | 749 return gpu_client_tracing_id_; |
748 } | 750 } |
749 | 751 |
750 // In normal cases, |client_id| is a child process id, so we can perform | 752 // In normal cases, |client_id| is a child process id, so we can perform |
751 // the standard conversion. | 753 // the standard conversion. |
752 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId( | 754 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId( |
753 client_id); | 755 client_id); |
754 } | 756 } |
755 | 757 |
756 } // namespace content | 758 } // namespace content |
OLD | NEW |