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

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

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mock gpu video accelerator factory Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/video_capture_impl.h
diff --git a/content/renderer/media/video_capture_impl.h b/content/renderer/media/video_capture_impl.h
index c1d9f22971a69f0465baffb194e08a73de9be449..1595fb3b5592932bce1c5971d52381d57293536e 100644
--- a/content/renderer/media/video_capture_impl.h
+++ b/content/renderer/media/video_capture_impl.h
@@ -104,6 +104,11 @@ class CONTENT_EXPORT VideoCaptureImpl
};
typedef std::map<int, ClientInfo> ClientInfoMap;
+ typedef base::Callback<void(uint32 sync_point,
+ const gpu::SyncToken& sync_token,
+ double consumer_resource_utilization)>
+ BufferFinishedCB;
dcheng 2015/10/27 19:09:28 Generally, abbreviations are discouraged: http://g
David Yen 2015/10/28 22:03:43 Done.
+
// VideoCaptureMessageFilter::Delegate interface.
void OnBufferCreated(base::SharedMemoryHandle handle,
int length,
@@ -130,16 +135,16 @@ class CONTENT_EXPORT VideoCaptureImpl
// Sends an IPC message to browser process when all clients are done with the
// buffer.
- void OnClientBufferFinished(
- int buffer_id,
- const scoped_refptr<ClientBuffer>& buffer,
- uint32 release_sync_point,
- double consumer_resource_utilization);
- void OnClientBufferFinished2(
- int buffer_id,
- const scoped_refptr<ClientBuffer2>& buffer,
- uint32 release_sync_point,
- double consumer_resource_utilization);
+ void OnClientBufferFinished(int buffer_id,
+ const scoped_refptr<ClientBuffer>& buffer,
+ uint32 release_sync_point,
+ const gpu::SyncToken& release_sync_token,
+ double consumer_resource_utilization);
+ void OnClientBufferFinished2(int buffer_id,
+ const scoped_refptr<ClientBuffer2>& buffer,
+ uint32 release_sync_point,
+ const gpu::SyncToken& release_sync_token,
+ double consumer_resource_utilization);
void StopDevice();
void RestartCapture();
@@ -155,9 +160,10 @@ class CONTENT_EXPORT VideoCaptureImpl
// RESOURCE_UTILIZATION value from the |metadata| and then runs the given
// callback, to trampoline back to the IO thread with the values.
static void DidFinishConsumingFrame(
- const media::VideoFrameMetadata* metadata,
- uint32* release_sync_point_storage, // Takes ownership.
- const base::Callback<void(uint32, double)>& callback_to_io_thread);
+ const media::VideoFrameMetadata* metadata,
+ uint32* release_sync_point_storage, // Takes ownership.
+ gpu::SyncToken* release_sync_token_storage, // Takes ownership
+ const BufferFinishedCB& callback_to_io_thread);
const scoped_refptr<VideoCaptureMessageFilter> message_filter_;
int device_id_;

Powered by Google App Engine
This is Rietveld 408576698