| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_HELPERS_H_ | 5 #ifndef MEDIA_GPU_GPU_VIDEO_DECODE_ACCELERATOR_HELPERS_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_HELPERS_H_ | 6 #define MEDIA_GPU_GPU_VIDEO_DECODE_ACCELERATOR_HELPERS_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 | 10 |
| 11 namespace gfx { | 11 namespace gfx { |
| 12 class GLContext; | 12 class GLContext; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace gl { | 15 namespace gl { |
| 16 class GLImage; | 16 class GLImage; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace gpu { | 19 namespace gpu { |
| 20 namespace gles2 { | 20 namespace gles2 { |
| 21 class GLES2Decoder; | 21 class GLES2Decoder; |
| 22 } | 22 } |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace content { | 25 namespace media { |
| 26 | 26 |
| 27 // Helpers/defines for specific VideoDecodeAccelerator implementations in GPU | 27 // Helpers/defines for specific VideoDecodeAccelerator implementations in GPU |
| 28 // process. Which callbacks are required depends on the implementation. | 28 // process. Which callbacks are required depends on the implementation. |
| 29 // | 29 // |
| 30 // Note that these callbacks may be called more than once, and so must own/share | 30 // Note that these callbacks may be called more than once, and so must own/share |
| 31 // ownership of any objects bound to them. | 31 // ownership of any objects bound to them. |
| 32 // | 32 // |
| 33 // Unless specified otherwise, these callbacks must be executed on the GPU Child | 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). | 34 // thread (i.e. the thread which the VDAs are initialized on). |
| 35 | 35 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 47 using BindGLImageCallback = | 47 using BindGLImageCallback = |
| 48 base::Callback<bool(uint32_t client_texture_id, | 48 base::Callback<bool(uint32_t client_texture_id, |
| 49 uint32_t texture_target, | 49 uint32_t texture_target, |
| 50 const scoped_refptr<gl::GLImage>& image, | 50 const scoped_refptr<gl::GLImage>& image, |
| 51 bool can_bind_to_sampler)>; | 51 bool can_bind_to_sampler)>; |
| 52 | 52 |
| 53 // Return a WeakPtr to a GLES2Decoder, if one is available. | 53 // Return a WeakPtr to a GLES2Decoder, if one is available. |
| 54 using GetGLES2DecoderCallback = | 54 using GetGLES2DecoderCallback = |
| 55 base::Callback<base::WeakPtr<gpu::gles2::GLES2Decoder>(void)>; | 55 base::Callback<base::WeakPtr<gpu::gles2::GLES2Decoder>(void)>; |
| 56 | 56 |
| 57 } // namespace content | 57 } // namespace media |
| 58 | 58 |
| 59 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_HELPERS_H_ | 59 #endif // MEDIA_GPU_GPU_VIDEO_DECODE_ACCELERATOR_HELPERS_H_ |
| OLD | NEW |