| 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 <vector> | 10 #include <vector> |
| (...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 lose_context_when_out_of_memory, | 1349 lose_context_when_out_of_memory, |
| 1350 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"), | 1350 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"), |
| 1351 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), | 1351 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), |
| 1352 NULL)), | 1352 NULL)), |
| 1353 GPU_VIDEO_ACCELERATOR_CONTEXT); | 1353 GPU_VIDEO_ACCELERATOR_CONTEXT); |
| 1354 } | 1354 } |
| 1355 if (gpu_va_context_provider_.get()) { | 1355 if (gpu_va_context_provider_.get()) { |
| 1356 const bool enable_video_accelerator = | 1356 const bool enable_video_accelerator = |
| 1357 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); | 1357 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); |
| 1358 const bool enable_gpu_memory_buffer_video_frames = | 1358 const bool enable_gpu_memory_buffer_video_frames = |
| 1359 #if defined(OS_MACOSX) |
| 1360 !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames); |
| 1361 #else |
| 1359 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames); | 1362 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames); |
| 1363 #endif |
| 1360 std::string image_texture_target_string = | 1364 std::string image_texture_target_string = |
| 1361 cmd_line->GetSwitchValueASCII(switches::kVideoImageTextureTarget); | 1365 cmd_line->GetSwitchValueASCII(switches::kVideoImageTextureTarget); |
| 1362 unsigned image_texture_target = 0; | 1366 unsigned image_texture_target = 0; |
| 1363 const bool parsed_image_texture_target = | 1367 const bool parsed_image_texture_target = |
| 1364 base::StringToUint(image_texture_target_string, &image_texture_target); | 1368 base::StringToUint(image_texture_target_string, &image_texture_target); |
| 1365 DCHECK(parsed_image_texture_target); | 1369 DCHECK(parsed_image_texture_target); |
| 1366 CHECK(gpu_channel_.get()) << "Have gpu_va_context_provider but no " | 1370 CHECK(gpu_channel_.get()) << "Have gpu_va_context_provider but no " |
| 1367 "gpu_channel_. See crbug.com/495185."; | 1371 "gpu_channel_. See crbug.com/495185."; |
| 1368 CHECK(gpu_channel_host.get()) << "Have gpu_va_context_provider but lost " | 1372 CHECK(gpu_channel_host.get()) << "Have gpu_va_context_provider but lost " |
| 1369 "gpu_channel_. See crbug.com/495185."; | 1373 "gpu_channel_. See crbug.com/495185."; |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1963 } | 1967 } |
| 1964 | 1968 |
| 1965 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1969 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1966 size_t erased = | 1970 size_t erased = |
| 1967 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1971 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1968 routing_id_); | 1972 routing_id_); |
| 1969 DCHECK_EQ(1u, erased); | 1973 DCHECK_EQ(1u, erased); |
| 1970 } | 1974 } |
| 1971 | 1975 |
| 1972 } // namespace content | 1976 } // namespace content |
| OLD | NEW |