Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1308913003: Re-land: Enable GpuMemoryBuffers video frames on MacOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 lose_context_when_out_of_memory, 1347 lose_context_when_out_of_memory,
1348 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"), 1348 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"),
1349 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), 1349 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
1350 NULL)), 1350 NULL)),
1351 GPU_VIDEO_ACCELERATOR_CONTEXT); 1351 GPU_VIDEO_ACCELERATOR_CONTEXT);
1352 } 1352 }
1353 if (gpu_va_context_provider_.get()) { 1353 if (gpu_va_context_provider_.get()) {
1354 const bool enable_video_accelerator = 1354 const bool enable_video_accelerator =
1355 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); 1355 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
1356 const bool enable_gpu_memory_buffer_video_frames = 1356 const bool enable_gpu_memory_buffer_video_frames =
1357 #if defined(OS_MACOSX)
1358 !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
1359 #else
1357 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames); 1360 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames);
1361 #endif
1358 std::string image_texture_target_string = 1362 std::string image_texture_target_string =
1359 cmd_line->GetSwitchValueASCII(switches::kVideoImageTextureTarget); 1363 cmd_line->GetSwitchValueASCII(switches::kVideoImageTextureTarget);
1360 unsigned image_texture_target = 0; 1364 unsigned image_texture_target = 0;
1361 const bool parsed_image_texture_target = 1365 const bool parsed_image_texture_target =
1362 base::StringToUint(image_texture_target_string, &image_texture_target); 1366 base::StringToUint(image_texture_target_string, &image_texture_target);
1363 DCHECK(parsed_image_texture_target); 1367 DCHECK(parsed_image_texture_target);
1364 CHECK(gpu_channel_.get()) << "Have gpu_va_context_provider but no " 1368 CHECK(gpu_channel_.get()) << "Have gpu_va_context_provider but no "
1365 "gpu_channel_. See crbug.com/495185."; 1369 "gpu_channel_. See crbug.com/495185.";
1366 CHECK(gpu_channel_host.get()) << "Have gpu_va_context_provider but lost " 1370 CHECK(gpu_channel_host.get()) << "Have gpu_va_context_provider but lost "
1367 "gpu_channel_. See crbug.com/495185."; 1371 "gpu_channel_. See crbug.com/495185.";
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 } 1964 }
1961 1965
1962 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1966 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1963 size_t erased = 1967 size_t erased =
1964 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1968 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1965 routing_id_); 1969 routing_id_);
1966 DCHECK_EQ(1u, erased); 1970 DCHECK_EQ(1u, erased);
1967 } 1971 }
1968 1972
1969 } // namespace content 1973 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698