Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index ae8b74f46afd6a0ff047fae96b19a0721b904488..95f435d6816c94f84286993fa0268114368f5f82 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -586,6 +586,18 @@ void RenderThreadImpl::Init() { |
is_gpu_rasterization_forced_ = |
command_line.HasSwitch(switches::kForceGpuRasterization); |
+ if (command_line.HasSwitch(switches::kGpuRasterizationMSAASampleCount)) { |
+ std::string string_value = command_line.GetSwitchValueASCII( |
+ switches::kGpuRasterizationMSAASampleCount); |
+ bool parsed_msaa_sample_count = |
+ base::StringToInt(string_value, &gpu_rasterization_msaa_sample_count_); |
danakj
2015/01/26 21:04:32
git cl format
Stephen White
2015/01/26 22:39:51
Done.
|
+ DCHECK(parsed_msaa_sample_count) << string_value; |
+ DCHECK_GT(gpu_rasterization_msaa_sample_count_, 0); |
+ DCHECK_LE(gpu_rasterization_msaa_sample_count_, 16); |
danakj
2015/01/26 21:04:32
magic number duplication, i'd maybe not do this
Stephen White
2015/01/26 22:39:51
Good idea. In fact, there's no reason for an upper
|
+ } else { |
+ gpu_rasterization_msaa_sample_count_ = 0; |
+ } |
+ |
if (command_line.HasSwitch(switches::kDisableDistanceFieldText)) { |
is_distance_field_text_enabled_ = false; |
} else if (command_line.HasSwitch(switches::kEnableDistanceFieldText)) { |
@@ -1342,6 +1354,10 @@ bool RenderThreadImpl::IsGpuRasterizationEnabled() { |
return is_gpu_rasterization_enabled_; |
} |
+int RenderThreadImpl::GpuRasterizationMSAASampleCount() { |
+ return gpu_rasterization_msaa_sample_count_; |
+} |
+ |
bool RenderThreadImpl::IsLcdTextEnabled() { |
return is_lcd_text_enabled_; |
} |