Index: content/browser/gpu/compositor_util.cc |
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc |
index 444f43c67acb8add4923b8c96e321c38a635b4af..37e9c571719267eb8646878241c074f077c7b6e1 100644 |
--- a/content/browser/gpu/compositor_util.cc |
+++ b/content/browser/gpu/compositor_util.cc |
@@ -34,6 +34,9 @@ const char* kMultipleRasterThreadsFeatureName = "multiple_raster_threads"; |
const int kMinRasterThreads = 1; |
const int kMaxRasterThreads = 64; |
+const int kMinMSAASampleCount = 0; |
+const int kMaxMSAASampleCount = 16; |
+ |
struct GpuFeatureInfo { |
std::string name; |
bool blocked; |
@@ -305,6 +308,26 @@ bool UseSurfacesEnabled() { |
#endif |
} |
+int GpuRasterizationMSAASampleCount() { |
+ const base::CommandLine& command_line = |
+ *base::CommandLine::ForCurrentProcess(); |
+ |
+ if (!command_line.HasSwitch(switches::kGpuRasterizationMSAASampleCount)) |
+ return 0; |
+ std::string string_value = |
+ command_line.GetSwitchValueASCII(switches::kGpuRasterizationMSAASampleCount); |
danakj
2015/01/26 21:04:32
git cl format
Stephen White
2015/01/26 22:39:51
Done.
|
+ int msaa_sample_count = 0; |
+ if (base::StringToInt(string_value, &msaa_sample_count) && |
+ msaa_sample_count >= kMinMSAASampleCount && |
+ msaa_sample_count <= kMaxMSAASampleCount) { |
+ return msaa_sample_count; |
+ } else { |
+ LOG(WARNING) << "Failed to parse switch " << |
danakj
2015/01/26 21:04:32
DLOG?
Stephen White
2015/01/26 22:39:51
TOn 2015/01/26 21:04:32, danakj wrote:
|
+ switches::kGpuRasterizationMSAASampleCount << ": " << string_value; |
+ return 0; |
+ } |
+} |
+ |
base::DictionaryValue* GetFeatureStatus() { |
GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); |
std::string gpu_access_blocked_reason; |