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

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

Issue 10944037: Add field trial for enabling Stage3D in XP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests Created 8 years, 3 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 | « chrome/test/gpu/gpu_feature_browsertest.cc ('k') | content/public/common/content_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index b6f2f7f46c44171947578bf7fc520c0270d496d7..58af57d416089390d1ee6711233d12bcb87a51b2 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -8,6 +8,7 @@
#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/metrics/field_trial.h"
#include "base/string_piece.h"
#include "base/stringprintf.h"
#include "base/sys_info.h"
@@ -20,6 +21,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/gpu_data_manager_observer.h"
#include "content/public/common/content_client.h"
+#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "grit/content_resources.h"
#include "ui/base/ui_base_switches.h"
@@ -421,6 +423,12 @@ void GpuDataManagerImpl::UpdateVideoMemoryUsageStats(
video_memory_usage_stats);
}
+// Experiment to determine whether Stage3D should be blacklisted on XP.
+bool Stage3DBlacklisted() {
+ return base::FieldTrialList::FindFullName(content::kStage3DFieldTrialName) ==
+ content::kStage3DFieldTrialBlacklistedName;
+}
+
void GpuDataManagerImpl::UpdateBlacklistedFeatures(
GpuFeatureType features) {
CommandLine* command_line = CommandLine::ForCurrentProcess();
@@ -436,6 +444,9 @@ void GpuDataManagerImpl::UpdateBlacklistedFeatures(
command_line->HasSwitch(switches::kBlacklistWebGL)) {
flags |= content::GPU_FEATURE_TYPE_WEBGL;
}
+ if (Stage3DBlacklisted()) {
+ flags |= content::GPU_FEATURE_TYPE_FLASH_STAGE3D;
+ }
gpu_feature_type_ = static_cast<GpuFeatureType>(flags);
EnableSoftwareRenderingIfNecessary();
« no previous file with comments | « chrome/test/gpu/gpu_feature_browsertest.cc ('k') | content/public/common/content_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698