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

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

Issue 8897022: Revert 113895 - <video> decode in hardware! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_RENDERER_GPU_VIDEO_DECODER_FACTORIES_H_
6 #define CONTENT_RENDERER_RENDERER_GPU_VIDEO_DECODER_FACTORIES_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/weak_ptr.h"
12 #include "media/filters/gpu_video_decoder.h"
13 #include "ui/gfx/size.h"
14
15 class GpuChannelHost;
16 class RendererGLContext;
17
18 // Glue code to expose functionality needed by media::GpuVideoDecoder to
19 // RenderViewImpl. This class is entirely an implementation detail of
20 // RenderViewImpl and only has its own header to allow extraction of its
21 // implementation from render_view_impl.cc which is already far too large.
22 class RendererGpuVideoDecoderFactories
23 : public media::GpuVideoDecoder::Factories {
24 public:
25 // Takes a ref on |gpu_channel_host| and tests |context| for NULL before each
26 // use.
27 RendererGpuVideoDecoderFactories(GpuChannelHost* gpu_channel_host,
28 base::WeakPtr<RendererGLContext> context);
29
30 virtual ~RendererGpuVideoDecoderFactories();
31
32 media::VideoDecodeAccelerator* CreateVideoDecodeAccelerator(
33 media::VideoDecodeAccelerator::Profile profile,
34 media::VideoDecodeAccelerator::Client* client) OVERRIDE;
35
36 virtual bool CreateTextures(int32 count, const gfx::Size& size,
37 std::vector<uint32>* texture_ids) OVERRIDE;
38
39 virtual bool DeleteTexture(uint32 texture_id) OVERRIDE;
40
41 virtual base::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE;
42
43 private:
44 scoped_refptr<GpuChannelHost> gpu_channel_host_;
45 base::WeakPtr<RendererGLContext> context_;
46 DISALLOW_IMPLICIT_CONSTRUCTORS(RendererGpuVideoDecoderFactories);
47 };
48
49 #endif // CONTENT_RENDERER_RENDERER_GPU_VIDEO_DECODER_FACTORIES_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/renderer_gpu_video_decoder_factories.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698