| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_accelerator_factories.h" | 5 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
| 13 #include "cc/output/context_provider.h" | 13 #include "cc/output/context_provider.h" |
| 14 #include "content/child/child_gpu_memory_buffer_manager.h" | 14 #include "content/child/child_gpu_memory_buffer_manager.h" |
| 15 #include "content/child/child_thread_impl.h" | 15 #include "content/child/child_thread_impl.h" |
| 16 #include "content/common/gpu/client/context_provider_command_buffer.h" | 16 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 17 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 17 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 18 #include "content/renderer/render_thread_impl.h" | 18 #include "content/renderer/render_thread_impl.h" |
| 19 #include "gpu/command_buffer/client/gles2_interface.h" | 19 #include "gpu/command_buffer/client/gles2_interface.h" |
| 20 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" | 20 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" |
| 21 #include "gpu/ipc/client/gpu_channel_host.h" | 21 #include "gpu/ipc/client/gpu_channel_host.h" |
| 22 #include "media/gpu/gpu_video_accelerator_util.h" |
| 22 #include "media/gpu/ipc/client/gpu_video_decode_accelerator_host.h" | 23 #include "media/gpu/ipc/client/gpu_video_decode_accelerator_host.h" |
| 23 #include "media/gpu/ipc/client/gpu_video_encode_accelerator_host.h" | 24 #include "media/gpu/ipc/client/gpu_video_encode_accelerator_host.h" |
| 24 #include "media/gpu/ipc/common/gpu_video_accelerator_util.h" | |
| 25 #include "media/video/video_decode_accelerator.h" | 25 #include "media/video/video_decode_accelerator.h" |
| 26 #include "media/video/video_encode_accelerator.h" | 26 #include "media/video/video_encode_accelerator.h" |
| 27 | 27 |
| 28 namespace content { | 28 namespace content { |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 // This enum values match ContextProviderPhase in histograms.xml | 32 // This enum values match ContextProviderPhase in histograms.xml |
| 33 enum ContextProviderPhase { | 33 enum ContextProviderPhase { |
| 34 CONTEXT_PROVIDER_ACQUIRED = 0, | 34 CONTEXT_PROVIDER_ACQUIRED = 0, |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 context_provider_refptr_ = nullptr; | 306 context_provider_refptr_ = nullptr; |
| 307 } | 307 } |
| 308 | 308 |
| 309 scoped_refptr<ContextProviderCommandBuffer> | 309 scoped_refptr<ContextProviderCommandBuffer> |
| 310 RendererGpuVideoAcceleratorFactories::ContextProviderMainThread() { | 310 RendererGpuVideoAcceleratorFactories::ContextProviderMainThread() { |
| 311 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); | 311 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); |
| 312 return context_provider_refptr_; | 312 return context_provider_refptr_; |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace content | 315 } // namespace content |
| OLD | NEW |