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

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

Issue 9639005: HW video decode support for --enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
« no previous file with comments | « no previous file | content/renderer/media/renderer_gpu_video_decoder_factories.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/renderer_gpu_video_decoder_factories.h
diff --git a/content/renderer/media/renderer_gpu_video_decoder_factories.h b/content/renderer/media/renderer_gpu_video_decoder_factories.h
index 37359898d6ffa123259aba776ab42934113aefc8..044ffd61e8dfdeb58e9ad82dc111b257b5ec2b2c 100644
--- a/content/renderer/media/renderer_gpu_video_decoder_factories.h
+++ b/content/renderer/media/renderer_gpu_video_decoder_factories.h
@@ -14,7 +14,7 @@
#include "ui/gfx/size.h"
class GpuChannelHost;
-class ContentGLContext;
+class WebGraphicsContext3DCommandBufferImpl;
namespace base {
class WaitableEvent;
}
@@ -25,15 +25,19 @@ class WaitableEvent;
// implementation from render_view_impl.cc which is already far too large.
//
// The public methods of the class can be called from any thread, and are
-// internally trampolined to the thread on which the class was constructed
-// (de-facto, the renderer thread) if called from a different thread.
+// internally trampolined to the appropriate thread. GPU/GL-related calls go to
+// the constructor-argument loop (mostly that's the compositor thread, or the
+// renderer thread if threaded compositing is disabled), and shmem-related calls
+// go to the render thread.
class CONTENT_EXPORT RendererGpuVideoDecoderFactories
: public media::GpuVideoDecoder::Factories {
public:
// Takes a ref on |gpu_channel_host| and tests |context| for NULL before each
// use.
- RendererGpuVideoDecoderFactories(GpuChannelHost* gpu_channel_host,
- base::WeakPtr<ContentGLContext> context);
+ RendererGpuVideoDecoderFactories(
+ GpuChannelHost* gpu_channel_host,
+ MessageLoop* message_loop,
+ WebGraphicsContext3DCommandBufferImpl* wgc3dcbi);
virtual media::VideoDecodeAccelerator* CreateVideoDecodeAccelerator(
media::VideoDecodeAccelerator::Profile profile,
@@ -52,10 +56,11 @@ class CONTENT_EXPORT RendererGpuVideoDecoderFactories
virtual ~RendererGpuVideoDecoderFactories();
private:
- // Async versions of the public methods. These all run on |message_loop_|
- // exclusively, and use output parameters instead of return values. Finally,
- // each takes a WaitableEvent* param to signal completion (except for
- // DeleteTexture, which is fire-and-forget).
+ // Async versions of the public methods. They use output parameters instead
+ // of return values and each takes a WaitableEvent* param to signal completion
+ // (except for DeleteTexture, which is fire-and-forget).
+ // AsyncCreateSharedMemory runs on the renderer thread and the rest run on
+ // |message_loop_|.
void AsyncCreateVideoDecodeAccelerator(
media::VideoDecodeAccelerator::Profile profile,
media::VideoDecodeAccelerator::Client* client,
@@ -70,7 +75,7 @@ class CONTENT_EXPORT RendererGpuVideoDecoderFactories
MessageLoop* message_loop_;
scoped_refptr<GpuChannelHost> gpu_channel_host_;
- base::WeakPtr<ContentGLContext> context_;
+ WebGraphicsContext3DCommandBufferImpl* wgc3dcbi_;
no sievers 2012/03/08 20:09:27 What about the WGC3D going away? Not only during c
Ami GONE FROM CHROMIUM 2012/03/08 20:19:51 Dunno. James? (in practice these races will be ra
no sievers 2012/03/08 21:16:16 If you still use the WeakPtr to the ContentGLConte
Ami GONE FROM CHROMIUM 2012/03/08 21:22:27 Actually isn't it enough to know that this member
DISALLOW_IMPLICIT_CONSTRUCTORS(RendererGpuVideoDecoderFactories);
};
« no previous file with comments | « no previous file | content/renderer/media/renderer_gpu_video_decoder_factories.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698