| 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 CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
| 14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
| 15 #include "content/common/gpu/gpu_command_buffer_stub.h" | 15 #include "content/common/gpu/gpu_command_buffer_stub.h" |
| 16 #include "content/common/gpu/media/video_decode_accelerator_impl.h" | |
| 17 #include "gpu/command_buffer/service/texture_manager.h" | 16 #include "gpu/command_buffer/service/texture_manager.h" |
| 18 #include "ipc/ipc_listener.h" | 17 #include "ipc/ipc_listener.h" |
| 19 #include "ipc/ipc_sender.h" | 18 #include "ipc/ipc_sender.h" |
| 20 #include "media/video/video_decode_accelerator.h" | 19 #include "media/video/video_decode_accelerator.h" |
| 21 #include "ui/gfx/size.h" | 20 #include "ui/gfx/size.h" |
| 22 | 21 |
| 23 namespace base { | 22 namespace base { |
| 24 class MessageLoopProxy; | 23 class MessageLoopProxy; |
| 25 } | 24 } |
| 26 | 25 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 90 |
| 92 // Route ID to communicate with the host. | 91 // Route ID to communicate with the host. |
| 93 int32 host_route_id_; | 92 int32 host_route_id_; |
| 94 | 93 |
| 95 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is | 94 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is |
| 96 // registered as a DestuctionObserver of |stub_| and will self-delete when | 95 // registered as a DestuctionObserver of |stub_| and will self-delete when |
| 97 // |stub_| is destroyed. | 96 // |stub_| is destroyed. |
| 98 GpuCommandBufferStub* stub_; | 97 GpuCommandBufferStub* stub_; |
| 99 | 98 |
| 100 // The underlying VideoDecodeAccelerator. | 99 // The underlying VideoDecodeAccelerator. |
| 101 scoped_ptr<VideoDecodeAcceleratorImpl> video_decode_accelerator_; | 100 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
| 102 | 101 |
| 103 // Callback for making the relevant context current for GL calls. | 102 // Callback for making the relevant context current for GL calls. |
| 104 // Returns false if failed. | 103 // Returns false if failed. |
| 105 base::Callback<bool(void)> make_context_current_; | 104 base::Callback<bool(void)> make_context_current_; |
| 106 | 105 |
| 107 // The texture dimensions as requested by ProvidePictureBuffers(). | 106 // The texture dimensions as requested by ProvidePictureBuffers(). |
| 108 gfx::Size texture_dimensions_; | 107 gfx::Size texture_dimensions_; |
| 109 | 108 |
| 110 // The texture target as requested by ProvidePictureBuffers(). | 109 // The texture target as requested by ProvidePictureBuffers(). |
| 111 uint32 texture_target_; | 110 uint32 texture_target_; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 133 | 132 |
| 134 // A map from picture buffer ID to TextureRef that have not been cleared. | 133 // A map from picture buffer ID to TextureRef that have not been cleared. |
| 135 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; | 134 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; |
| 136 | 135 |
| 137 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 136 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
| 138 }; | 137 }; |
| 139 | 138 |
| 140 } // namespace content | 139 } // namespace content |
| 141 | 140 |
| 142 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 141 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |