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

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

Issue 22935009: Add content::SurfaceCapturer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_stride
Patch Set: cff149b4 WIP Created 7 years, 4 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_buffer_pool.cc
diff --git a/content/browser/renderer_host/media/video_capture_buffer_pool.cc b/content/browser/renderer_host/media/video_capture_buffer_pool.cc
index 207f86a99f3df42cea42f8402ddaf3dacdd2f856..f8d3a25e5a2e03b9f66cf5e1e3911e04cf5b925d 100644
--- a/content/browser/renderer_host/media/video_capture_buffer_pool.cc
+++ b/content/browser/renderer_host/media/video_capture_buffer_pool.cc
@@ -128,8 +128,10 @@ int VideoCaptureBufferPool::RecognizeReservedBuffer(
scoped_refptr<media::VideoFrame> VideoCaptureBufferPool::ReserveI420VideoFrame(
const gfx::Size& size,
int rotation) {
- if (static_cast<size_t>(size.GetArea() * 3 / 2) != GetMemorySize())
+ if (GetMemorySize() !=
+ media::VideoFrame::AllocationSize(media::VideoFrame::I420, size)) {
return NULL;
+ }
base::AutoLock lock(lock_);
@@ -151,6 +153,7 @@ scoped_refptr<media::VideoFrame> VideoCaptureBufferPool::ReserveI420VideoFrame(
gfx::Rect(size),
size,
static_cast<uint8*>(buffer->shared_memory.memory()),
+ GetMemorySize(),
buffer->shared_memory.handle(),
base::TimeDelta(),
disposal_handler);

Powered by Google App Engine
This is Rietveld 408576698