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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator_helpers.h

Issue 1745903002: Introduce GpuVideoDecodeAcceleratorFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_HELPERS_H_
6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_HELPERS_H_
7
8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h"
10
11 namespace gfx {
12 class GLContext;
13 }
14
15 namespace gl {
16 class GLImage;
17 }
18
19 namespace gpu {
20 namespace gles2 {
21 class GLES2Decoder;
22 }
23 }
24
25 namespace content {
26
27 // Helpers/defines for specific VideoDecodeAccelerator implementations in GPU
28 // process. Which callbacks are required depends on the implementation.
29 //
30 // Note that these callbacks may be called more than once, and so must own/share
31 // ownership of any objects bound to them.
32 //
33 // Unless specified otherwise, these callbacks must be executed on the GPU Child
34 // thread (i.e. the thread which the VDAs are initialized on).
35
36 // Return current GLContext.
37 using GetGLContextCallback = base::Callback<gfx::GLContext*(void)>;
38
39 // Make the applicable GL context current. To be called by VDAs before
40 // executing any GL calls. Return true on success, false otherwise.
41 using MakeGLContextCurrentCallback = base::Callback<bool(void)>;
42
43 // Bind |image| to |client_texture_id| given |texture_target|.
44 // Return true on success, false otherwise.
45 using BindGLImageCallback =
46 base::Callback<bool(uint32_t client_texture_id,
47 uint32_t texture_target,
48 const scoped_refptr<gl::GLImage>& image)>;
49
50 // Return a WeakPtr to a GLES2Decoder, if one is available.
51 using GetGLES2DecoderCallback =
52 base::Callback<base::WeakPtr<gpu::gles2::GLES2Decoder>(void)>;
53
54 } // namespace content
55
56 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698