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

Side by Side Diff: content/browser/renderer_host/media/video_capture_buffer_pool.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 | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | gpu/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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer_host/media/video_capture_buffer_pool.h" 5 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 DCHECK(base::SharedMemory::IsHandleValid(current_gmb_handle.handle)); 167 DCHECK(base::SharedMemory::IsHandleValid(current_gmb_handle.handle));
168 base::SharedMemory shared_memory( 168 base::SharedMemory shared_memory(
169 base::SharedMemory::DuplicateHandle(current_gmb_handle.handle), 169 base::SharedMemory::DuplicateHandle(current_gmb_handle.handle),
170 false); 170 false);
171 shared_memory.ShareToProcess(process_handle, &new_handle->handle); 171 shared_memory.ShareToProcess(process_handle, &new_handle->handle);
172 DCHECK(base::SharedMemory::IsHandleValid(new_handle->handle)); 172 DCHECK(base::SharedMemory::IsHandleValid(new_handle->handle));
173 new_handle->type = gfx::SHARED_MEMORY_BUFFER; 173 new_handle->type = gfx::SHARED_MEMORY_BUFFER;
174 return true; 174 return true;
175 } 175 }
176 case gfx::IO_SURFACE_BUFFER: 176 case gfx::IO_SURFACE_BUFFER:
177 case gfx::SURFACE_TEXTURE_BUFFER:
178 case gfx::OZONE_NATIVE_PIXMAP: 177 case gfx::OZONE_NATIVE_PIXMAP:
179 *new_handle = current_gmb_handle; 178 *new_handle = current_gmb_handle;
180 return true; 179 return true;
181 } 180 }
182 NOTREACHED(); 181 NOTREACHED();
183 return true; 182 return true;
184 } 183 }
185 184
186 private: 185 private:
187 // A simple proxy that implements the BufferHandle interface, providing 186 // A simple proxy that implements the BufferHandle interface, providing
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 return buffer_id; 473 return buffer_id;
475 } 474 }
476 475
477 VideoCaptureBufferPool::Tracker* VideoCaptureBufferPool::GetTracker( 476 VideoCaptureBufferPool::Tracker* VideoCaptureBufferPool::GetTracker(
478 int buffer_id) { 477 int buffer_id) {
479 TrackerMap::const_iterator it = trackers_.find(buffer_id); 478 TrackerMap::const_iterator it = trackers_.find(buffer_id);
480 return (it == trackers_.end()) ? NULL : it->second; 479 return (it == trackers_.end()) ? NULL : it->second;
481 } 480 }
482 481
483 } // namespace content 482 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698