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

Unified Diff: content/gpu/gpu_info_collector_android.cc

Issue 12225128: Android: Restrict virtual contexts on NVIDIA to Nexus 7. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_info_collector_android.cc
diff --git a/content/gpu/gpu_info_collector_android.cc b/content/gpu/gpu_info_collector_android.cc
index 3073fbdbb1441f3959d24ea542b764531a9ce702..233f8ca819b8dbe7fc6438c2a36f5158c78088f2 100644
--- a/content/gpu/gpu_info_collector_android.cc
+++ b/content/gpu/gpu_info_collector_android.cc
@@ -71,17 +71,18 @@ bool CollectBasicGraphicsInfo(content::GPUInfo* gpu_info) {
bool is_img = vendor.find("imagination") != std::string::npos;
bool is_arm = vendor.find("arm") != std::string::npos;
bool is_qualcomm = vendor.find("qualcomm") != std::string::npos;
- bool is_nvidia = vendor.find("nvidia") != std::string::npos;
bool is_mali_t604 = is_arm && renderer.find("mali-t604") != std::string::npos;
- bool sdk_17_or_greater =
- base::android::BuildInfo::GetInstance()->sdk_int() >= 17;
+ base::android::BuildInfo* build_info =
+ base::android::BuildInfo::GetInstance();
+ std::string model = build_info->model();
+ model = StringToLowerASCII(model);
+ bool is_nexus7 = model.find("nexus 7") != std::string::npos;
// IMG: avoid context switching perf problems, crashes with share groups
// Mali-T604: http://crbug.com/154715
// QualComm, NVIDIA: Crashes with share groups
- if (is_img || is_mali_t604 || is_qualcomm ||
- (is_nvidia && sdk_17_or_greater)) {
+ if (is_img || is_mali_t604 || is_qualcomm || is_nexus7) {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableVirtualGLContexts);
}
« 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