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

Side by Side Diff: content/renderer/media/renderer_gpu_video_decoder_factories.h

Issue 11468033: Vanquish the remnants of media::MessageLoopFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_DECODER_FACTORIES_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_DECODER_FACTORIES_H_
6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_DECODER_FACTORIES_H_ 6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_DECODER_FACTORIES_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 22 matching lines...) Expand all
33 class CONTENT_EXPORT RendererGpuVideoDecoderFactories 33 class CONTENT_EXPORT RendererGpuVideoDecoderFactories
34 : public media::GpuVideoDecoder::Factories { 34 : public media::GpuVideoDecoder::Factories {
35 public: 35 public:
36 // Takes a ref on |gpu_channel_host| and tests |context| for loss before each 36 // Takes a ref on |gpu_channel_host| and tests |context| for loss before each
37 // use. 37 // use.
38 RendererGpuVideoDecoderFactories( 38 RendererGpuVideoDecoderFactories(
39 GpuChannelHost* gpu_channel_host, 39 GpuChannelHost* gpu_channel_host,
40 const scoped_refptr<base::MessageLoopProxy>& message_loop, 40 const scoped_refptr<base::MessageLoopProxy>& message_loop,
41 WebGraphicsContext3DCommandBufferImpl* wgc3dcbi); 41 WebGraphicsContext3DCommandBufferImpl* wgc3dcbi);
42 42
43 // media::GpuVideoDecoder::Factories implementation.
43 virtual media::VideoDecodeAccelerator* CreateVideoDecodeAccelerator( 44 virtual media::VideoDecodeAccelerator* CreateVideoDecodeAccelerator(
44 media::VideoCodecProfile profile, 45 media::VideoCodecProfile profile,
45 media::VideoDecodeAccelerator::Client* client) OVERRIDE; 46 media::VideoDecodeAccelerator::Client* client) OVERRIDE;
46
47 virtual bool CreateTextures(int32 count, const gfx::Size& size, 47 virtual bool CreateTextures(int32 count, const gfx::Size& size,
48 std::vector<uint32>* texture_ids, 48 std::vector<uint32>* texture_ids,
49 uint32 texture_target) OVERRIDE; 49 uint32 texture_target) OVERRIDE;
50
51 virtual void DeleteTexture(uint32 texture_id) OVERRIDE; 50 virtual void DeleteTexture(uint32 texture_id) OVERRIDE;
52
53 virtual void ReadPixels(uint32 texture_id, uint32 texture_target, 51 virtual void ReadPixels(uint32 texture_id, uint32 texture_target,
54 const gfx::Size& size, void* pixels) OVERRIDE; 52 const gfx::Size& size, void* pixels) OVERRIDE;
55
56 virtual base::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE; 53 virtual base::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE;
54 virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() OVERRIDE;
57 55
58 protected: 56 protected:
59 friend class base::RefCountedThreadSafe<RendererGpuVideoDecoderFactories>; 57 friend class base::RefCountedThreadSafe<RendererGpuVideoDecoderFactories>;
60 virtual ~RendererGpuVideoDecoderFactories(); 58 virtual ~RendererGpuVideoDecoderFactories();
61 59
62 private: 60 private:
63 // Helper for the constructor to acquire the ContentGLContext on the 61 // Helper for the constructor to acquire the ContentGLContext on the
64 // compositor thread (when it is enabled). 62 // compositor thread (when it is enabled).
65 void AsyncGetContext(WebGraphicsContext3DCommandBufferImpl* context, 63 void AsyncGetContext(WebGraphicsContext3DCommandBufferImpl* context,
66 base::WaitableEvent* waiter); 64 base::WaitableEvent* waiter);
(...skipping 20 matching lines...) Expand all
87 85
88 scoped_refptr<base::MessageLoopProxy> message_loop_; 86 scoped_refptr<base::MessageLoopProxy> message_loop_;
89 scoped_refptr<GpuChannelHost> gpu_channel_host_; 87 scoped_refptr<GpuChannelHost> gpu_channel_host_;
90 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context_; 88 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context_;
91 DISALLOW_IMPLICIT_CONSTRUCTORS(RendererGpuVideoDecoderFactories); 89 DISALLOW_IMPLICIT_CONSTRUCTORS(RendererGpuVideoDecoderFactories);
92 }; 90 };
93 91
94 } // namespace content 92 } // namespace content
95 93
96 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_DECODER_FACTORIES_H_ 94 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_DECODER_FACTORIES_H_
OLDNEW
« no previous file with comments | « content/public/renderer/content_renderer_client.cc ('k') | content/renderer/media/renderer_gpu_video_decoder_factories.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698