OLD | NEW |
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_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/shared_memory.h" | 16 #include "base/memory/shared_memory.h" |
17 #include "base/synchronization/waitable_event.h" | 17 #include "base/synchronization/waitable_event.h" |
18 #include "content/common/gpu/media/gpu_video_decode_accelerator_helpers.h" | |
19 #include "gpu/command_buffer/service/texture_manager.h" | 18 #include "gpu/command_buffer/service/texture_manager.h" |
20 #include "gpu/config/gpu_info.h" | 19 #include "gpu/config/gpu_info.h" |
21 #include "gpu/ipc/service/gpu_command_buffer_stub.h" | 20 #include "gpu/ipc/service/gpu_command_buffer_stub.h" |
22 #include "gpu/ipc/service/gpu_command_buffer_stub.h" | 21 #include "gpu/ipc/service/gpu_command_buffer_stub.h" |
23 #include "ipc/ipc_listener.h" | 22 #include "ipc/ipc_listener.h" |
24 #include "ipc/ipc_sender.h" | 23 #include "ipc/ipc_sender.h" |
| 24 #include "media/gpu/gpu_video_decode_accelerator_helpers.h" |
25 #include "media/video/video_decode_accelerator.h" | 25 #include "media/video/video_decode_accelerator.h" |
26 #include "ui/gfx/geometry/size.h" | 26 #include "ui/gfx/geometry/size.h" |
27 | 27 |
28 namespace gpu { | 28 namespace gpu { |
29 struct GpuPreferences; | 29 struct GpuPreferences; |
30 } // namespace gpu | 30 } // namespace gpu |
31 | 31 |
32 namespace content { | 32 namespace media { |
33 | 33 |
34 class GpuVideoDecodeAccelerator | 34 class GpuVideoDecodeAccelerator |
35 : public IPC::Listener, | 35 : public IPC::Listener, |
36 public IPC::Sender, | 36 public IPC::Sender, |
37 public media::VideoDecodeAccelerator::Client, | 37 public media::VideoDecodeAccelerator::Client, |
38 public gpu::GpuCommandBufferStub::DestructionObserver { | 38 public gpu::GpuCommandBufferStub::DestructionObserver { |
39 public: | 39 public: |
40 // Each of the arguments to the constructor must outlive this object. | 40 // Each of the arguments to the constructor must outlive this object. |
41 // |stub->decoder()| will be made current around any operation that touches | 41 // |stub->decoder()| will be made current around any operation that touches |
42 // the underlying VDA so that it can make GL calls safely. | 42 // the underlying VDA so that it can make GL calls safely. |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 base::Lock debug_uncleared_textures_lock_; | 157 base::Lock debug_uncleared_textures_lock_; |
158 | 158 |
159 // A map from picture buffer ID to set of TextureRefs that have not been | 159 // A map from picture buffer ID to set of TextureRefs that have not been |
160 // cleared. | 160 // cleared. |
161 std::map<int32_t, std::vector<scoped_refptr<gpu::gles2::TextureRef>>> | 161 std::map<int32_t, std::vector<scoped_refptr<gpu::gles2::TextureRef>>> |
162 uncleared_textures_; | 162 uncleared_textures_; |
163 | 163 |
164 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 164 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
165 }; | 165 }; |
166 | 166 |
167 } // namespace content | 167 } // namespace media |
168 | 168 |
169 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 169 #endif // MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |