OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 #else | 579 #else |
580 is_lcd_text_enabled_ = true; | 580 is_lcd_text_enabled_ = true; |
581 #endif | 581 #endif |
582 } | 582 } |
583 | 583 |
584 is_gpu_rasterization_enabled_ = | 584 is_gpu_rasterization_enabled_ = |
585 command_line.HasSwitch(switches::kEnableGpuRasterization); | 585 command_line.HasSwitch(switches::kEnableGpuRasterization); |
586 is_gpu_rasterization_forced_ = | 586 is_gpu_rasterization_forced_ = |
587 command_line.HasSwitch(switches::kForceGpuRasterization); | 587 command_line.HasSwitch(switches::kForceGpuRasterization); |
588 | 588 |
| 589 if (command_line.HasSwitch(switches::kGpuRasterizationMSAASampleCount)) { |
| 590 std::string string_value = command_line.GetSwitchValueASCII( |
| 591 switches::kGpuRasterizationMSAASampleCount); |
| 592 bool parsed_msaa_sample_count = |
| 593 base::StringToInt(string_value, &gpu_rasterization_msaa_sample_count_); |
| 594 DCHECK(parsed_msaa_sample_count) << string_value; |
| 595 DCHECK_GE(gpu_rasterization_msaa_sample_count_, 0); |
| 596 } else { |
| 597 gpu_rasterization_msaa_sample_count_ = 0; |
| 598 } |
| 599 |
589 if (command_line.HasSwitch(switches::kDisableDistanceFieldText)) { | 600 if (command_line.HasSwitch(switches::kDisableDistanceFieldText)) { |
590 is_distance_field_text_enabled_ = false; | 601 is_distance_field_text_enabled_ = false; |
591 } else if (command_line.HasSwitch(switches::kEnableDistanceFieldText)) { | 602 } else if (command_line.HasSwitch(switches::kEnableDistanceFieldText)) { |
592 is_distance_field_text_enabled_ = true; | 603 is_distance_field_text_enabled_ = true; |
593 } else { | 604 } else { |
594 is_distance_field_text_enabled_ = false; | 605 is_distance_field_text_enabled_ = false; |
595 } | 606 } |
596 | 607 |
597 // Note that under Linux, the media library will normally already have | 608 // Note that under Linux, the media library will normally already have |
598 // been initialized by the Zygote before this instance became a Renderer. | 609 // been initialized by the Zygote before this instance became a Renderer. |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 } | 1346 } |
1336 | 1347 |
1337 bool RenderThreadImpl::IsGpuRasterizationForced() { | 1348 bool RenderThreadImpl::IsGpuRasterizationForced() { |
1338 return is_gpu_rasterization_forced_; | 1349 return is_gpu_rasterization_forced_; |
1339 } | 1350 } |
1340 | 1351 |
1341 bool RenderThreadImpl::IsGpuRasterizationEnabled() { | 1352 bool RenderThreadImpl::IsGpuRasterizationEnabled() { |
1342 return is_gpu_rasterization_enabled_; | 1353 return is_gpu_rasterization_enabled_; |
1343 } | 1354 } |
1344 | 1355 |
| 1356 int RenderThreadImpl::GetGpuRasterizationMSAASampleCount() { |
| 1357 return gpu_rasterization_msaa_sample_count_; |
| 1358 } |
| 1359 |
1345 bool RenderThreadImpl::IsLcdTextEnabled() { | 1360 bool RenderThreadImpl::IsLcdTextEnabled() { |
1346 return is_lcd_text_enabled_; | 1361 return is_lcd_text_enabled_; |
1347 } | 1362 } |
1348 | 1363 |
1349 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { | 1364 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { |
1350 return is_distance_field_text_enabled_; | 1365 return is_distance_field_text_enabled_; |
1351 } | 1366 } |
1352 | 1367 |
1353 bool RenderThreadImpl::IsZeroCopyEnabled() { | 1368 bool RenderThreadImpl::IsZeroCopyEnabled() { |
1354 return is_zero_copy_enabled_; | 1369 return is_zero_copy_enabled_; |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1775 hidden_widget_count_--; | 1790 hidden_widget_count_--; |
1776 | 1791 |
1777 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1792 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1778 return; | 1793 return; |
1779 } | 1794 } |
1780 | 1795 |
1781 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1796 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1782 } | 1797 } |
1783 | 1798 |
1784 } // namespace content | 1799 } // namespace content |
OLD | NEW |