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

Side by Side Diff: content/browser/renderer_host/media/gpu_memory_buffer_tracker.cc

Issue 2361173002: Move classses VideoCaptureDeviceClient and VideoCaptureBufferPool to media/capture/video (Closed)
Patch Set: mcasas@ comments Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/gpu_memory_buffer_tracker.h" 5 #include "content/browser/renderer_host/media/gpu_memory_buffer_tracker.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 8 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
9 #include "content/browser/renderer_host/media/gpu_memory_buffer_handle.h" 9 #include "content/browser/renderer_host/media/gpu_memory_buffer_handle.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE, 51 gfx::BufferUsage::GPU_READ_CPU_READ_WRITE,
52 gpu::kNullSurfaceHandle)); 52 gpu::kNullSurfaceHandle));
53 53
54 DLOG_IF(ERROR, !gpu_memory_buffers_[i]) << "Allocating GpuMemoryBuffer"; 54 DLOG_IF(ERROR, !gpu_memory_buffers_[i]) << "Allocating GpuMemoryBuffer";
55 if (!gpu_memory_buffers_[i] || !gpu_memory_buffers_[i]->Map()) 55 if (!gpu_memory_buffers_[i] || !gpu_memory_buffers_[i]->Map())
56 return false; 56 return false;
57 } 57 }
58 return true; 58 return true;
59 } 59 }
60 60
61 std::unique_ptr<VideoCaptureBufferHandle> 61 std::unique_ptr<media::VideoCaptureBufferHandle>
62 GpuMemoryBufferTracker::GetBufferHandle() { 62 GpuMemoryBufferTracker::GetBufferHandle() {
63 DCHECK_EQ(gpu_memory_buffers_.size(), 63 DCHECK_EQ(gpu_memory_buffers_.size(),
64 media::VideoFrame::NumPlanes(pixel_format())); 64 media::VideoFrame::NumPlanes(pixel_format()));
65 return base::MakeUnique<GpuMemoryBufferBufferHandle>(this); 65 return base::MakeUnique<GpuMemoryBufferBufferHandle>(this);
66 } 66 }
67 67
68 bool GpuMemoryBufferTracker::ShareToProcess( 68 bool GpuMemoryBufferTracker::ShareToProcess(
69 base::ProcessHandle process_handle, 69 base::ProcessHandle process_handle,
70 base::SharedMemoryHandle* new_handle) { 70 base::SharedMemoryHandle* new_handle) {
71 NOTREACHED(); 71 NOTREACHED();
(...skipping 24 matching lines...) Expand all
96 case gfx::IO_SURFACE_BUFFER: 96 case gfx::IO_SURFACE_BUFFER:
97 case gfx::OZONE_NATIVE_PIXMAP: 97 case gfx::OZONE_NATIVE_PIXMAP:
98 *new_handle = current_gmb_handle; 98 *new_handle = current_gmb_handle;
99 return true; 99 return true;
100 } 100 }
101 NOTREACHED(); 101 NOTREACHED();
102 return true; 102 return true;
103 } 103 }
104 104
105 } // namespace content 105 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698