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 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" | 5 #include "content/renderer/media/renderer_gpu_video_decoder_factories.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
9 #include "content/common/child_thread.h" | 9 #include "content/common/child_thread.h" |
10 #include "content/renderer/gpu/command_buffer_proxy.h" | 10 #include "content/common/gpu/client/command_buffer_proxy.h" |
11 #include "content/renderer/gpu/gpu_channel_host.h" | 11 #include "content/common/gpu/client/gpu_channel_host.h" |
12 #include "content/renderer/gpu/renderer_gl_context.h" | 12 #include "content/common/gpu/client/content_gl_context.h" |
13 #include "gpu/command_buffer/client/gles2_implementation.h" | 13 #include "gpu/command_buffer/client/gles2_implementation.h" |
14 | 14 |
15 RendererGpuVideoDecoderFactories::~RendererGpuVideoDecoderFactories() {} | 15 RendererGpuVideoDecoderFactories::~RendererGpuVideoDecoderFactories() {} |
16 RendererGpuVideoDecoderFactories::RendererGpuVideoDecoderFactories( | 16 RendererGpuVideoDecoderFactories::RendererGpuVideoDecoderFactories( |
17 GpuChannelHost* gpu_channel_host, base::WeakPtr<RendererGLContext> context) | 17 GpuChannelHost* gpu_channel_host, base::WeakPtr<ContentGLContext> context) |
18 : message_loop_(MessageLoop::current()), | 18 : message_loop_(MessageLoop::current()), |
19 gpu_channel_host_(gpu_channel_host), | 19 gpu_channel_host_(gpu_channel_host), |
20 context_(context) { | 20 context_(context) { |
21 } | 21 } |
22 | 22 |
23 media::VideoDecodeAccelerator* | 23 media::VideoDecodeAccelerator* |
24 RendererGpuVideoDecoderFactories::CreateVideoDecodeAccelerator( | 24 RendererGpuVideoDecoderFactories::CreateVideoDecodeAccelerator( |
25 media::VideoDecodeAccelerator::Profile profile, | 25 media::VideoDecodeAccelerator::Profile profile, |
26 media::VideoDecodeAccelerator::Client* client) { | 26 media::VideoDecodeAccelerator::Client* client) { |
27 media::VideoDecodeAccelerator* vda = NULL; | 27 media::VideoDecodeAccelerator* vda = NULL; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 size, &shm, &waiter)); | 112 size, &shm, &waiter)); |
113 waiter.Wait(); | 113 waiter.Wait(); |
114 return shm; | 114 return shm; |
115 } | 115 } |
116 | 116 |
117 void RendererGpuVideoDecoderFactories::AsyncCreateSharedMemory( | 117 void RendererGpuVideoDecoderFactories::AsyncCreateSharedMemory( |
118 size_t size, base::SharedMemory** shm, base::WaitableEvent* waiter) { | 118 size_t size, base::SharedMemory** shm, base::WaitableEvent* waiter) { |
119 *shm = ChildThread::current()->AllocateSharedMemory(size); | 119 *shm = ChildThread::current()->AllocateSharedMemory(size); |
120 waiter->Signal(); | 120 waiter->Signal(); |
121 } | 121 } |
OLD | NEW |