| 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" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 : main_thread_task_runner_(main_thread_task_runner), | 71 : main_thread_task_runner_(main_thread_task_runner), |
| 72 task_runner_(task_runner), | 72 task_runner_(task_runner), |
| 73 gpu_channel_host_(std::move(gpu_channel_host)), | 73 gpu_channel_host_(std::move(gpu_channel_host)), |
| 74 context_provider_refptr_(context_provider), | 74 context_provider_refptr_(context_provider), |
| 75 context_provider_(context_provider.get()), | 75 context_provider_(context_provider.get()), |
| 76 enable_gpu_memory_buffer_video_frames_( | 76 enable_gpu_memory_buffer_video_frames_( |
| 77 enable_gpu_memory_buffer_video_frames), | 77 enable_gpu_memory_buffer_video_frames), |
| 78 image_texture_targets_(image_texture_targets), | 78 image_texture_targets_(image_texture_targets), |
| 79 video_accelerator_enabled_(enable_video_accelerator), | 79 video_accelerator_enabled_(enable_video_accelerator), |
| 80 gpu_memory_buffer_manager_( | 80 gpu_memory_buffer_manager_( |
| 81 ChildThreadImpl::current()->gpu_memory_buffer_manager()), | 81 RenderThreadImpl::current()->GetGpuMemoryBufferManager()), |
| 82 thread_safe_sender_(ChildThreadImpl::current()->thread_safe_sender()) { | 82 thread_safe_sender_(ChildThreadImpl::current()->thread_safe_sender()) { |
| 83 DCHECK(main_thread_task_runner_); | 83 DCHECK(main_thread_task_runner_); |
| 84 DCHECK(gpu_channel_host_); | 84 DCHECK(gpu_channel_host_); |
| 85 } | 85 } |
| 86 | 86 |
| 87 RendererGpuVideoAcceleratorFactories::~RendererGpuVideoAcceleratorFactories() {} | 87 RendererGpuVideoAcceleratorFactories::~RendererGpuVideoAcceleratorFactories() {} |
| 88 | 88 |
| 89 bool RendererGpuVideoAcceleratorFactories::CheckContextLost() { | 89 bool RendererGpuVideoAcceleratorFactories::CheckContextLost() { |
| 90 DCHECK(task_runner_->BelongsToCurrentThread()); | 90 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 91 if (context_provider_) { | 91 if (context_provider_) { |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 context_provider_refptr_ = nullptr; | 316 context_provider_refptr_ = nullptr; |
| 317 } | 317 } |
| 318 | 318 |
| 319 scoped_refptr<ContextProviderCommandBuffer> | 319 scoped_refptr<ContextProviderCommandBuffer> |
| 320 RendererGpuVideoAcceleratorFactories::ContextProviderMainThread() { | 320 RendererGpuVideoAcceleratorFactories::ContextProviderMainThread() { |
| 321 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); | 321 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); |
| 322 return context_provider_refptr_; | 322 return context_provider_refptr_; |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace content | 325 } // namespace content |
| OLD | NEW |