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

Unified Diff: content/browser/renderer_host/media/video_capture_texture_wrapper.cc

Issue 1024113003: Add multi-planar functions to GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment and typo fix. Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_texture_wrapper.cc
diff --git a/content/browser/renderer_host/media/video_capture_texture_wrapper.cc b/content/browser/renderer_host/media/video_capture_texture_wrapper.cc
index e02b6fc92347ff5c38e676e1bcb20dd526156539..537cd5190e3a47b12fd5690f61d6096d0954e712 100644
--- a/content/browser/renderer_host/media/video_capture_texture_wrapper.cc
+++ b/content/browser/renderer_host/media/video_capture_texture_wrapper.cc
@@ -283,7 +283,11 @@ void VideoCaptureTextureWrapper::TextureWrapperDelegate::OnIncomingCapturedData(
gpu_memory_buffers_.pop();
DCHECK(gpu_memory_buffer.get());
- uint8* mapped_buffer = static_cast<uint8*>(gpu_memory_buffer->Map());
+ void* mapped_buffers[gpu_memory_buffer->GetNumberOfPlanes()];
+ bool map_completed = gpu_memory_buffer->Map(mapped_buffers);
+ DCHECK(map_completed);
+
+ uint8* mapped_buffer = static_cast<uint8*>(mapped_buffers[0]);
reveman 2015/03/23 22:24:01 If you're assuming one plane then you might as wel
emircan 2015/03/24 16:52:26 Done. I wasn't sure if these functions would be su
DCHECK(mapped_buffer);
libyuv::ARGBCopy(
reinterpret_cast<uint8*>(argb_buffer->data()), frame_size.width() * 4,

Powered by Google App Engine
This is Rietveld 408576698