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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 881513004: Add a command-line flag to set GPU rasterization multisampling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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_;
}

Powered by Google App Engine
This is Rietveld 408576698