Chromium Code Reviews| Index: content/common/gpu/media/vaapi_video_encode_accelerator.cc |
| diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc |
| index 6cfdd9d1faa3ec46d02428d206cceb5bcd97d7d0..c0cf43ee931ccfaae9cf9493b6a76ec99b76b947 100644 |
| --- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc |
| +++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/bind.h" |
| #include "base/callback.h" |
| #include "base/command_line.h" |
| +#include "base/cpu.h" |
| #include "base/message_loop/message_loop_proxy.h" |
| #include "base/metrics/histogram.h" |
| #include "base/numerics/safe_conversions.h" |
| @@ -109,8 +110,13 @@ std::vector<media::VideoEncodeAccelerator::SupportedProfile> |
| VaapiVideoEncodeAccelerator::GetSupportedProfiles() { |
| std::vector<SupportedProfile> profiles; |
| + base::CPU cpu; |
| const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| - if (!cmd_line->HasSwitch(switches::kEnableVaapiAcceleratedVideoEncode)) |
| + bool encode_enabled = |
| + (!cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode) && |
| + (cpu.vendor_name() == "GenuineIntel") && (cpu.model() == 55)); |
|
piman
2014/07/07 17:57:47
You said this was used in the renderer? Does this
Pawel Osciak
2014/07/08 05:32:42
Yes, this is in renderer. PreSandboxStartup() (htt
|
| + |
| + if (!encode_enabled) |
| return profiles; |
| SupportedProfile profile; |