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

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

Issue 1972783002: Disable GMB VideoFrames if GPU compositing is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | 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 <utility> 10 #include <utility>
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 if (!media_context_provider->BindToCurrentThread()) 1416 if (!media_context_provider->BindToCurrentThread())
1417 return nullptr; 1417 return nullptr;
1418 media_context_provider->SetupLock(); 1418 media_context_provider->SetupLock();
1419 1419
1420 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner = 1420 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
1421 GetMediaThreadTaskRunner(); 1421 GetMediaThreadTaskRunner();
1422 const bool enable_video_accelerator = 1422 const bool enable_video_accelerator =
1423 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); 1423 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
1424 const bool enable_gpu_memory_buffer_video_frames = 1424 const bool enable_gpu_memory_buffer_video_frames =
1425 #if defined(OS_MACOSX) || defined(OS_LINUX) 1425 #if defined(OS_MACOSX) || defined(OS_LINUX)
1426 !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames); 1426 !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) &&
1427 !cmd_line->HasSwitch(switches::kDisableGpuCompositing);
danakj 2016/05/12 01:00:08 We also don't use gpu compositing when the channel
1427 #else 1428 #else
1428 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames); 1429 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames);
1429 #endif 1430 #endif
1430 std::vector<unsigned> image_texture_targets; 1431 std::vector<unsigned> image_texture_targets;
1431 std::string video_frame_image_texture_target_string = 1432 std::string video_frame_image_texture_target_string =
1432 cmd_line->GetSwitchValueASCII(switches::kVideoImageTextureTarget); 1433 cmd_line->GetSwitchValueASCII(switches::kVideoImageTextureTarget);
1433 StringToUintVector(video_frame_image_texture_target_string, 1434 StringToUintVector(video_frame_image_texture_target_string,
1434 &image_texture_targets); 1435 &image_texture_targets);
1435 1436
1436 gpu_factories_.push_back(RendererGpuVideoAcceleratorFactories::Create( 1437 gpu_factories_.push_back(RendererGpuVideoAcceleratorFactories::Create(
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 } 2071 }
2071 2072
2072 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2073 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2073 size_t erased = 2074 size_t erased =
2074 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2075 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2075 routing_id_); 2076 routing_id_);
2076 DCHECK_EQ(1u, erased); 2077 DCHECK_EQ(1u, erased);
2077 } 2078 }
2078 2079
2079 } // namespace content 2080 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698