Chromium Code Reviews| 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_FACTORY_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
| 10 #include "content/common/content_export.h" | |
| 10 #include "gpu/command_buffer/service/gpu_preferences.h" | 11 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 11 #include "gpu/config/gpu_info.h" | 12 #include "gpu/config/gpu_info.h" |
| 12 #include "media/video/video_decode_accelerator.h" | 13 #include "media/video/video_decode_accelerator.h" |
| 13 | 14 |
| 14 namespace gfx { | 15 namespace gfx { |
| 15 class GLContext; | 16 class GLContext; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace gl { | 19 namespace gl { |
| 19 class GLImage; | 20 class GLImage; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace gpu { | 23 namespace gpu { |
| 23 struct GpuPreferences; | 24 struct GpuPreferences; |
| 24 | 25 |
| 25 namespace gles2 { | 26 namespace gles2 { |
| 26 class GLES2Decoder; | 27 class GLES2Decoder; |
| 27 } | 28 } |
| 28 } | 29 } |
| 29 | 30 |
| 30 namespace content { | 31 namespace content { |
| 31 | 32 |
| 32 // TODO(posciak): this class should be an implementation of | 33 // TODO(posciak): this class should be an implementation of |
| 33 // content::GpuVideoDecodeAcceleratorFactory, however that can only be achieved | 34 // content::GpuVideoDecodeAcceleratorFactory, however that can only be achieved |
| 34 // once this is moved out of content/common, see crbug.com/597150 and related. | 35 // once this is moved out of content/common, see crbug.com/597150 and related. |
| 35 class GpuVideoDecodeAcceleratorFactoryImpl { | 36 class |
| 36 public: | 37 #if defined(CONTENT_IMPLEMENTATION) |
| 38 CONTENT_EXPORT | |
| 39 #endif | |
|
piman
2016/04/07 22:26:58
Please just add CONTENT_EXPORT unconditionally (ju
Mark Dittmer
2016/04/08 13:08:43
Done.
| |
| 40 GpuVideoDecodeAcceleratorFactoryImpl { | |
| 41 public: | |
| 37 ~GpuVideoDecodeAcceleratorFactoryImpl(); | 42 ~GpuVideoDecodeAcceleratorFactoryImpl(); |
| 38 | 43 |
| 39 // Return current GLContext. | 44 // Return current GLContext. |
| 40 using GetGLContextCallback = base::Callback<gfx::GLContext*(void)>; | 45 using GetGLContextCallback = base::Callback<gfx::GLContext*(void)>; |
| 41 | 46 |
| 42 // Make the applicable GL context current. To be called by VDAs before | 47 // Make the applicable GL context current. To be called by VDAs before |
| 43 // executing any GL calls. Return true on success, false otherwise. | 48 // executing any GL calls. Return true on success, false otherwise. |
| 44 using MakeGLContextCurrentCallback = base::Callback<bool(void)>; | 49 using MakeGLContextCurrentCallback = base::Callback<bool(void)>; |
| 45 | 50 |
| 46 // Bind |image| to |client_texture_id| given |texture_target|. If | 51 // Bind |image| to |client_texture_id| given |texture_target|. If |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 const GetGLES2DecoderCallback get_gles2_decoder_cb_; | 118 const GetGLES2DecoderCallback get_gles2_decoder_cb_; |
| 114 | 119 |
| 115 base::ThreadChecker thread_checker_; | 120 base::ThreadChecker thread_checker_; |
| 116 | 121 |
| 117 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAcceleratorFactoryImpl); | 122 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAcceleratorFactoryImpl); |
| 118 }; | 123 }; |
| 119 | 124 |
| 120 } // namespace content | 125 } // namespace content |
| 121 | 126 |
| 122 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ | 127 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ |
| OLD | NEW |