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

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 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..773de53f4b83132f03c9eb8a8b2b84948dfdcd31 100644
--- a/content/browser/renderer_host/media/video_capture_texture_wrapper.cc
+++ b/content/browser/renderer_host/media/video_capture_texture_wrapper.cc
@@ -283,11 +283,17 @@ void VideoCaptureTextureWrapper::TextureWrapperDelegate::OnIncomingCapturedData(
gpu_memory_buffers_.pop();
DCHECK(gpu_memory_buffer.get());
- uint8* mapped_buffer = static_cast<uint8*>(gpu_memory_buffer->Map());
+ void* data = NULL;
+ bool rv = gpu_memory_buffer->Map(&data);
+ DCHECK(rv);
+ uint32 stride;
+ gpu_memory_buffer->GetStride(&stride);
+
+ uint8* mapped_buffer = static_cast<uint8*>(data);
DCHECK(mapped_buffer);
libyuv::ARGBCopy(
reinterpret_cast<uint8*>(argb_buffer->data()), frame_size.width() * 4,
- mapped_buffer, frame_size.width() * 4,
+ mapped_buffer, stride,
frame_size.width(), frame_size.height());
gpu_memory_buffer->Unmap();
« no previous file with comments | « content/browser/compositor/buffer_queue_unittest.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698