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

Unified Diff: content/renderer/media/video_capture_impl.cc

Issue 175223003: HW Video: Make media::VideoFrame handle the sync point of the compositor as well as webgl (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: rebase to ToT Created 6 years, 8 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
« no previous file with comments | « content/renderer/media/video_capture_impl.h ('k') | content/renderer/media/video_capture_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_capture_impl.cc
diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc
index bda203a41dc211014b6c1a71c234a4c7cae00d2b..465c9fe5da4e6be4dd0d2c5400f6b5f96fc647f6 100644
--- a/content/renderer/media/video_capture_impl.cc
+++ b/content/renderer/media/video_capture_impl.cc
@@ -214,7 +214,8 @@ void VideoCaptureImpl::OnBufferReceived(int buffer_id,
DCHECK_EQ(format.pixel_format, media::PIXEL_FORMAT_I420);
if (state_ != VIDEO_CAPTURE_STATE_STARTED || suspended_) {
- Send(new VideoCaptureHostMsg_BufferReady(device_id_, buffer_id, 0));
+ Send(new VideoCaptureHostMsg_BufferReady(
+ device_id_, buffer_id, std::vector<uint32>()));
return;
}
@@ -242,12 +243,12 @@ void VideoCaptureImpl::OnBufferReceived(int buffer_id,
buffer->buffer_size,
buffer->buffer->handle(),
timestamp - first_frame_timestamp_,
- media::BindToCurrentLoop(base::Bind(
- &VideoCaptureImpl::OnClientBufferFinished,
- weak_factory_.GetWeakPtr(),
- buffer_id,
- buffer,
- base::Passed(scoped_ptr<gpu::MailboxHolder>().Pass()))));
+ media::BindToCurrentLoop(
+ base::Bind(&VideoCaptureImpl::OnClientBufferFinished,
+ weak_factory_.GetWeakPtr(),
+ buffer_id,
+ buffer,
+ std::vector<uint32>())));
for (ClientInfoMap::iterator it = clients_.begin(); it != clients_.end();
++it) {
@@ -266,7 +267,7 @@ void VideoCaptureImpl::OnMailboxBufferReceived(
if (state_ != VIDEO_CAPTURE_STATE_STARTED || suspended_) {
Send(new VideoCaptureHostMsg_BufferReady(
- device_id_, buffer_id, mailbox_holder.sync_point));
+ device_id_, buffer_id, std::vector<uint32>()));
return;
}
@@ -296,10 +297,10 @@ void VideoCaptureImpl::OnMailboxBufferReceived(
void VideoCaptureImpl::OnClientBufferFinished(
int buffer_id,
const scoped_refptr<ClientBuffer>& /* ignored_buffer */,
- scoped_ptr<gpu::MailboxHolder> mailbox_holder) {
+ const std::vector<uint32>& release_sync_points) {
DCHECK(thread_checker_.CalledOnValidThread());
- const uint32 sync_point = (mailbox_holder ? mailbox_holder->sync_point : 0);
- Send(new VideoCaptureHostMsg_BufferReady(device_id_, buffer_id, sync_point));
+ Send(new VideoCaptureHostMsg_BufferReady(
+ device_id_, buffer_id, release_sync_points));
}
void VideoCaptureImpl::OnStateChanged(VideoCaptureState state) {
« no previous file with comments | « content/renderer/media/video_capture_impl.h ('k') | content/renderer/media/video_capture_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698