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

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

Issue 2353453002: ui: Remove SurfaceTexture GpuMemoryBuffer type. (Closed)
Patch Set: ui: Remove SurfaceTexture GpuMemoryBuffer type. Created 4 years, 3 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 | content/browser/renderer_host/media/video_capture_buffer_pool.cc » ('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 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 gfx::BufferFormat format, 184 gfx::BufferFormat format,
185 gfx::BufferUsage usage) { 185 gfx::BufferUsage usage) {
186 GpuMemoryBufferConfigurationSet native_configurations = 186 GpuMemoryBufferConfigurationSet native_configurations =
187 GetNativeGpuMemoryBufferConfigurations(); 187 GetNativeGpuMemoryBufferConfigurations();
188 if (native_configurations.find(std::make_pair(format, usage)) == 188 if (native_configurations.find(std::make_pair(format, usage)) ==
189 native_configurations.end()) { 189 native_configurations.end()) {
190 return GL_TEXTURE_2D; 190 return GL_TEXTURE_2D;
191 } 191 }
192 192
193 switch (gpu::GetNativeGpuMemoryBufferType()) { 193 switch (gpu::GetNativeGpuMemoryBufferType()) {
194 case gfx::SURFACE_TEXTURE_BUFFER:
195 case gfx::OZONE_NATIVE_PIXMAP: 194 case gfx::OZONE_NATIVE_PIXMAP:
196 // GPU memory buffers that are shared with the GL using EGLImages 195 // GPU memory buffers that are shared with the GL using EGLImages
197 // require TEXTURE_EXTERNAL_OES. 196 // require TEXTURE_EXTERNAL_OES.
198 return GL_TEXTURE_EXTERNAL_OES; 197 return GL_TEXTURE_EXTERNAL_OES;
199 case gfx::IO_SURFACE_BUFFER: 198 case gfx::IO_SURFACE_BUFFER:
200 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB. 199 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB.
201 return GL_TEXTURE_RECTANGLE_ARB; 200 return GL_TEXTURE_RECTANGLE_ARB;
202 case gfx::SHARED_MEMORY_BUFFER: 201 case gfx::SHARED_MEMORY_BUFFER:
203 return GL_TEXTURE_2D; 202 return GL_TEXTURE_2D;
204 case gfx::EMPTY_BUFFER: 203 case gfx::EMPTY_BUFFER:
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 format(format), 679 format(format),
681 usage(usage), 680 usage(usage),
682 gpu_host_id(gpu_host_id) {} 681 gpu_host_id(gpu_host_id) {}
683 682
684 BrowserGpuMemoryBufferManager::BufferInfo::BufferInfo(const BufferInfo& other) = 683 BrowserGpuMemoryBufferManager::BufferInfo::BufferInfo(const BufferInfo& other) =
685 default; 684 default;
686 685
687 BrowserGpuMemoryBufferManager::BufferInfo::~BufferInfo() {} 686 BrowserGpuMemoryBufferManager::BufferInfo::~BufferInfo() {}
688 687
689 } // namespace content 688 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_buffer_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698