diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-14 13:51:29 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-14 13:51:29 +0000 |
commit | 4504807dc2c05a12bea92e791e7c2a5a94f4234d (patch) | |
tree | 3579136c154b41f622bbc4380f0e037d3942aa61 /content/renderer/render_thread_impl.h | |
parent | bc6c00cab62fc382d84df8477e8d82f62df2a4e4 (diff) | |
download | chromium_src-4504807dc2c05a12bea92e791e7c2a5a94f4234d.zip chromium_src-4504807dc2c05a12bea92e791e7c2a5a94f4234d.tar.gz chromium_src-4504807dc2c05a12bea92e791e7c2a5a94f4234d.tar.bz2 |
Eliminate video capture thread in renderer
The main motivation of this change is to remove the video capture thread
in the renderer. All users of a video capture device already handles the
video frame on their thread. There is no need to call the clients with
an additional thread.
Summary of this change:
* Video capture thread eliminated
VideoCaptureImpl now runs on the IO thread. Clients are called on the
IO thread.
* Simplified VideoCaptureImplManager
We still need to keep this object for the purpose of sharing a
VideoCaptureImpl object with multiple clients. It should own these
objects and maintain the usage count. A couple clean up items are done
on this class:
* It doesn't own the video capture thread now.
* It is now a render thread only object.
* It maintains refcount of a VideoCaptureImpl explicitly.
* It is no longer refcounted.
* Clients access it through RenderThreadImpl. Which ensures usage is
on the render thread.
* New VideoCaptureHandle class
Object of this class is returned by VideoCaptureImplManager to give
access to a media::VideoCapture object. It is purely a wrapper and
helps to do refcounting on the render thread.
Testing:
Added unit tests for VideoCaptureImplManager to test refcounting.
Also updated unit test for VideoCaptureImpl due to the threading
changes.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244074
Review URL: https://codereview.chromium.org/120893002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_thread_impl.h')
-rw-r--r-- | content/renderer/render_thread_impl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index 16d2cb4..c9e4142 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h @@ -431,8 +431,8 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread, // Dispatches all P2P sockets. scoped_refptr<P2PSocketDispatcher> p2p_socket_dispatcher_; - // Used on multiple threads. - scoped_refptr<VideoCaptureImplManager> vc_manager_; + // Used on the render thread. + scoped_ptr<VideoCaptureImplManager> vc_manager_; // The count of RenderWidgets running through this thread. int widget_count_; |