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

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: Cache msaa sample count to avoid double-parsing it. 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/test/fake_compositor_dependencies.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index ef6dae73a17d9089b2dd3944daba5ce839042c19..8b96121f06951b0c57556f4caf4b47384d7116b6 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -586,6 +586,17 @@ 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_);
+ DCHECK(parsed_msaa_sample_count) << string_value;
+ DCHECK_GE(gpu_rasterization_msaa_sample_count_, 0);
+ } 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 +1353,10 @@ bool RenderThreadImpl::IsGpuRasterizationEnabled() {
return is_gpu_rasterization_enabled_;
}
+int RenderThreadImpl::GetGpuRasterizationMSAASampleCount() {
+ return gpu_rasterization_msaa_sample_count_;
+}
+
bool RenderThreadImpl::IsLcdTextEnabled() {
return is_lcd_text_enabled_;
}
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/test/fake_compositor_dependencies.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698