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

Unified Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 2585653003: gpu: Move buffer format to target texture map into gpu host. (Closed)
Patch Set: . Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/browser_gpu_memory_buffer_manager.cc
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
index f700c1f9276cdbb8a6b709a5c9748b6af66e6834..5c1d25a07576b49a0f448c552ce371aba184e75f 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -98,36 +98,6 @@ BrowserGpuMemoryBufferManager* BrowserGpuMemoryBufferManager::current() {
return g_gpu_memory_buffer_manager;
}
-// static
-uint32_t BrowserGpuMemoryBufferManager::GetImageTextureTarget(
- gfx::BufferFormat format,
- gfx::BufferUsage usage) {
- gpu::GpuMemoryBufferConfigurationSet native_configurations =
- gpu::GetNativeGpuMemoryBufferConfigurations();
- if (native_configurations.find(std::make_pair(format, usage)) ==
- native_configurations.end()) {
- return GL_TEXTURE_2D;
- }
-
- switch (gpu::GetNativeGpuMemoryBufferType()) {
- case gfx::OZONE_NATIVE_PIXMAP:
- // GPU memory buffers that are shared with the GL using EGLImages
- // require TEXTURE_EXTERNAL_OES.
- return GL_TEXTURE_EXTERNAL_OES;
- case gfx::IO_SURFACE_BUFFER:
- // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB.
- return GL_TEXTURE_RECTANGLE_ARB;
- case gfx::SHARED_MEMORY_BUFFER:
- return GL_TEXTURE_2D;
- case gfx::EMPTY_BUFFER:
- NOTREACHED();
- return GL_TEXTURE_2D;
- }
-
- NOTREACHED();
- return GL_TEXTURE_2D;
-}
-
std::unique_ptr<gfx::GpuMemoryBuffer>
BrowserGpuMemoryBufferManager::CreateGpuMemoryBuffer(
const gfx::Size& size,
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698