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

Unified Diff: content/common/gpu/media/vaapi_video_encode_accelerator.cc

Issue 374553002: VAVEA: Turn VAAPI encoder flag into a kill switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « content/common/gpu/media/gpu_video_encode_accelerator.cc ('k') | content/common/sandbox_linux/bpf_gpu_policy_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698