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 d549edf8f52267eb97f31172a31d00cc610d7b45..f108f761e9d8f6de81f16390f95024fa0140b2a3 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/stringprintf.h" |
#include "base/sys_info.h" |
#include "base/values.h" |
@@ -19,6 +20,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 "ui/base/ui_base_switches.h" |
#include "ui/gl/gl_implementation.h" |
@@ -383,6 +385,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(); |
@@ -398,6 +406,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(); |