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

Unified Diff: content/gpu/gpu_info_collector_android.cc

Issue 12212022: Android: Only allow virtual contexts on NV for SDK >= 17 (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 5d025277a272716014b26f04f147213218a2d41e..2ee10bc31cd1a226e82079a60f3544b19658c28d 100644
--- a/content/gpu/gpu_info_collector_android.cc
+++ b/content/gpu/gpu_info_collector_android.cc
@@ -4,6 +4,7 @@
#include "content/gpu/gpu_info_collector.h"
+#include "base/android/build_info.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/string_number_conversions.h"
@@ -66,10 +67,14 @@ bool CollectBasicGraphicsInfo(content::GPUInfo* gpu_info) {
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;
klobag.chromium 2013/02/05 22:28:49 I assume we already have this at this stage.
+
// 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) {
+ if (is_img || is_mali_t604 || is_qualcomm ||
+ (is_nvidia && sdk_17_or_greater)) {
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