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

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 269593008: GPU: Use virtual contexts on NVidia. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitespace. Created 6 years, 8 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/browser/gpu/gpu_data_manager_impl_private.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 96c403d5dc4aab07b89de34e84a6272ee1013782..9cea80e330fe9a160e105f35e8d6046f2501170e 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -237,9 +237,17 @@ void DisplayReconfigCallback(CGDirectDisplayID display,
#if defined(OS_ANDROID)
void ApplyAndroidWorkarounds(const gpu::GPUInfo& gpu_info,
- CommandLine* command_line) {
+ CommandLine* command_line,
+ std::set<int>* workarounds) {
std::string vendor(StringToLowerASCII(gpu_info.gl_vendor));
std::string renderer(StringToLowerASCII(gpu_info.gl_renderer));
+ std::string version(StringToLowerASCII(gpu_info.gl_version));
+
+ if (vendor.find("nvidia") != std::string::npos &&
+ version.find("3.1") != std::string::npos) {
+ workarounds->insert(gpu::USE_VIRTUALIZED_GL_CONTEXTS);
+ }
+
bool is_img =
gpu_info.gl_vendor.find("Imagination") != std::string::npos;
@@ -988,7 +996,8 @@ void GpuDataManagerImplPrivate::InitializeImpl(
UpdatePreliminaryBlacklistedFeatures();
#if defined(OS_ANDROID)
- ApplyAndroidWorkarounds(gpu_info, CommandLine::ForCurrentProcess());
+ ApplyAndroidWorkarounds(
+ gpu_info, CommandLine::ForCurrentProcess(), &gpu_driver_bugs_);
#endif // OS_ANDROID
}
« 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