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

Side by Side Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 1605423002: Make 'kVideoImageTextureTarget' a list of texture targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TEXTURE_2D for 420 biplanar. Created 4 years, 11 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 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698