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

Side by Side Diff: content/public/renderer/video_encode_accelerator.cc

Issue 2573873002: Disable HW accelerator for Cast on Android (Closed)
Patch Set: Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/public/renderer/video_encode_accelerator.h" 5 #include "content/public/renderer/video_encode_accelerator.h"
6 6
7 #include "base/task_runner_util.h" 7 #include "base/task_runner_util.h"
8 #include "content/renderer/render_thread_impl.h" 8 #include "content/renderer/render_thread_impl.h"
9 #include "media/gpu/ipc/client/gpu_video_encode_accelerator_host.h" 9 #include "media/gpu/ipc/client/gpu_video_encode_accelerator_host.h"
10 #include "media/renderers/gpu_video_accelerator_factories.h" 10 #include "media/renderers/gpu_video_accelerator_factories.h"
(...skipping 16 matching lines...) Expand all
27 base::PostTaskAndReplyWithResult( 27 base::PostTaskAndReplyWithResult(
28 encode_task_runner.get(), FROM_HERE, 28 encode_task_runner.get(), FROM_HERE,
29 base::Bind( 29 base::Bind(
30 &media::GpuVideoAcceleratorFactories::CreateVideoEncodeAccelerator, 30 &media::GpuVideoAcceleratorFactories::CreateVideoEncodeAccelerator,
31 base::Unretained(gpu_factories)), 31 base::Unretained(gpu_factories)),
32 base::Bind(callback, encode_task_runner)); 32 base::Bind(callback, encode_task_runner));
33 } 33 }
34 34
35 media::VideoEncodeAccelerator::SupportedProfiles 35 media::VideoEncodeAccelerator::SupportedProfiles
36 GetSupportedVideoEncodeAcceleratorProfiles() { 36 GetSupportedVideoEncodeAcceleratorProfiles() {
37 // In https://crbug.com/664652, H264 HW accelerator is enabled on Android for
38 // RTC by Default. Keep HW accelerator disalbed for Cast as before at present.
Avi (use Gerrit) 2016/12/13 21:34:56 typo: disabled
39 #if defined(OS_ANDROID)
40 return media::VideoEncodeAccelerator::SupportedProfiles();
41 #endif // defined(OS_ANDROID)
Avi (use Gerrit) 2016/12/13 21:34:56 Do #else and enclose the other block.
42
37 media::GpuVideoAcceleratorFactories* gpu_factories = 43 media::GpuVideoAcceleratorFactories* gpu_factories =
38 RenderThreadImpl::current()->GetGpuFactories(); 44 RenderThreadImpl::current()->GetGpuFactories();
39 if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled()) 45 if (!gpu_factories || !gpu_factories->IsGpuVideoAcceleratorEnabled())
40 return media::VideoEncodeAccelerator::SupportedProfiles(); 46 return media::VideoEncodeAccelerator::SupportedProfiles();
41 return gpu_factories->GetVideoEncodeAcceleratorSupportedProfiles(); 47 return gpu_factories->GetVideoEncodeAcceleratorSupportedProfiles();
42 } 48 }
43 49
44 } // namespace content 50 } // 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