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

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

Issue 2858293003: Enable GpuMemoryBuffer video frames on systems that support overlays. (Closed)
Patch Set: Created 3 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 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 1380
1381 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner = 1381 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
1382 GetMediaThreadTaskRunner(); 1382 GetMediaThreadTaskRunner();
1383 const bool enable_video_accelerator = 1383 const bool enable_video_accelerator =
1384 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode); 1384 !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
1385 const bool enable_gpu_memory_buffer_video_frames = 1385 const bool enable_gpu_memory_buffer_video_frames =
1386 #if defined(OS_MACOSX) || defined(OS_LINUX) 1386 #if defined(OS_MACOSX) || defined(OS_LINUX)
1387 !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) && 1387 !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) &&
1388 !cmd_line->HasSwitch(switches::kDisableGpuCompositing) && 1388 !cmd_line->HasSwitch(switches::kDisableGpuCompositing) &&
1389 !gpu_channel_host->gpu_info().software_rendering; 1389 !gpu_channel_host->gpu_info().software_rendering;
1390 #elif defined(OS_WIN)
1391 !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) &&
1392 !cmd_line->HasSwitch(switches::kDisableGpuCompositing) &&
1393 !gpu_channel_host->gpu_info().software_rendering &&
1394 (cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames) ||
1395 gpu_channel_host->gpu_info().supports_overlays);
1390 #else 1396 #else
1391 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames); 1397 cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames);
1392 #endif 1398 #endif
1393 1399
1394 gpu_factories_.push_back(RendererGpuVideoAcceleratorFactories::Create( 1400 gpu_factories_.push_back(RendererGpuVideoAcceleratorFactories::Create(
1395 std::move(gpu_channel_host), base::ThreadTaskRunnerHandle::Get(), 1401 std::move(gpu_channel_host), base::ThreadTaskRunnerHandle::Get(),
1396 media_task_runner, std::move(media_context_provider), 1402 media_task_runner, std::move(media_context_provider),
1397 enable_gpu_memory_buffer_video_frames, buffer_to_texture_target_map_, 1403 enable_gpu_memory_buffer_video_frames, buffer_to_texture_target_map_,
1398 enable_video_accelerator)); 1404 enable_video_accelerator));
1399 return gpu_factories_.back().get(); 1405 return gpu_factories_.back().get();
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2412 } 2418 }
2413 } 2419 }
2414 2420
2415 void RenderThreadImpl::OnRendererInterfaceRequest( 2421 void RenderThreadImpl::OnRendererInterfaceRequest(
2416 mojom::RendererAssociatedRequest request) { 2422 mojom::RendererAssociatedRequest request) {
2417 DCHECK(!renderer_binding_.is_bound()); 2423 DCHECK(!renderer_binding_.is_bound());
2418 renderer_binding_.Bind(std::move(request)); 2424 renderer_binding_.Bind(std::move(request));
2419 } 2425 }
2420 2426
2421 } // namespace content 2427 } // 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