| 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/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1462 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner = | 1462 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner = |
| 1463 GetMediaThreadTaskRunner(); | 1463 GetMediaThreadTaskRunner(); |
| 1464 scoped_refptr<ContextProviderCommandBuffer> shared_context_provider = | 1464 scoped_refptr<ContextProviderCommandBuffer> shared_context_provider = |
| 1465 SharedWorkerContextProvider(); | 1465 SharedWorkerContextProvider(); |
| 1466 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host = GetGpuChannel(); | 1466 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host = GetGpuChannel(); |
| 1467 if (shared_context_provider && gpu_channel_host) { | 1467 if (shared_context_provider && gpu_channel_host) { |
| 1468 const bool enable_video_accelerator = | 1468 const bool enable_video_accelerator = |
| 1469 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); | 1469 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); |
| 1470 const bool enable_gpu_memory_buffer_video_frames = | 1470 const bool enable_gpu_memory_buffer_video_frames = |
| 1471 #if defined(OS_MACOSX) || defined(OS_LINUX) | 1471 #if defined(OS_MACOSX) || defined(OS_LINUX) |
| 1472 !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames); | 1472 !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) && |
| 1473 !cmd_line->HasSwitch(switches::kDisableGpuCompositing) && |
| 1474 !gpu_channel_host->gpu_info().software_rendering; |
| 1473 #else | 1475 #else |
| 1474 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames); | 1476 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames); |
| 1475 #endif | 1477 #endif |
| 1476 std::vector<unsigned> image_texture_targets; | 1478 std::vector<unsigned> image_texture_targets; |
| 1477 std::string video_frame_image_texture_target_string = | 1479 std::string video_frame_image_texture_target_string = |
| 1478 cmd_line->GetSwitchValueASCII(switches::kVideoImageTextureTarget); | 1480 cmd_line->GetSwitchValueASCII(switches::kVideoImageTextureTarget); |
| 1479 StringToUintVector(video_frame_image_texture_target_string, | 1481 StringToUintVector(video_frame_image_texture_target_string, |
| 1480 &image_texture_targets); | 1482 &image_texture_targets); |
| 1481 | 1483 |
| 1482 gpu_factories_.push_back(RendererGpuVideoAcceleratorFactories::Create( | 1484 gpu_factories_.push_back(RendererGpuVideoAcceleratorFactories::Create( |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2145 } | 2147 } |
| 2146 | 2148 |
| 2147 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 2149 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 2148 size_t erased = | 2150 size_t erased = |
| 2149 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 2151 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 2150 routing_id_); | 2152 routing_id_); |
| 2151 DCHECK_EQ(1u, erased); | 2153 DCHECK_EQ(1u, erased); |
| 2152 } | 2154 } |
| 2153 | 2155 |
| 2154 } // namespace content | 2156 } // namespace content |
| OLD | NEW |