| 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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 if (command_line.HasSwitch(switches::kGpuRasterizationMSAASampleCount)) { | 611 if (command_line.HasSwitch(switches::kGpuRasterizationMSAASampleCount)) { |
| 612 std::string string_value = command_line.GetSwitchValueASCII( | 612 std::string string_value = command_line.GetSwitchValueASCII( |
| 613 switches::kGpuRasterizationMSAASampleCount); | 613 switches::kGpuRasterizationMSAASampleCount); |
| 614 bool parsed_msaa_sample_count = | 614 bool parsed_msaa_sample_count = |
| 615 base::StringToInt(string_value, &gpu_rasterization_msaa_sample_count_); | 615 base::StringToInt(string_value, &gpu_rasterization_msaa_sample_count_); |
| 616 DCHECK(parsed_msaa_sample_count) << string_value; | 616 DCHECK(parsed_msaa_sample_count) << string_value; |
| 617 DCHECK_GE(gpu_rasterization_msaa_sample_count_, 0); | 617 DCHECK_GE(gpu_rasterization_msaa_sample_count_, 0); |
| 618 } else { | 618 } else { |
| 619 gpu_rasterization_msaa_sample_count_ = 0; | 619 gpu_rasterization_msaa_sample_count_ = 0; |
| 620 } | 620 } |
| 621 is_threaded_gpu_rasterization_enabled_ = | |
| 622 command_line.HasSwitch(switches::kEnableThreadedGpuRasterization); | |
| 623 | 621 |
| 624 if (command_line.HasSwitch(switches::kDisableDistanceFieldText)) { | 622 if (command_line.HasSwitch(switches::kDisableDistanceFieldText)) { |
| 625 is_distance_field_text_enabled_ = false; | 623 is_distance_field_text_enabled_ = false; |
| 626 } else if (command_line.HasSwitch(switches::kEnableDistanceFieldText)) { | 624 } else if (command_line.HasSwitch(switches::kEnableDistanceFieldText)) { |
| 627 is_distance_field_text_enabled_ = true; | 625 is_distance_field_text_enabled_ = true; |
| 628 } else { | 626 } else { |
| 629 is_distance_field_text_enabled_ = false; | 627 is_distance_field_text_enabled_ = false; |
| 630 } | 628 } |
| 631 | 629 |
| 632 // Note that under Linux, the media library will normally already have | 630 // Note that under Linux, the media library will normally already have |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 } | 1367 } |
| 1370 | 1368 |
| 1371 bool RenderThreadImpl::IsGpuRasterizationForced() { | 1369 bool RenderThreadImpl::IsGpuRasterizationForced() { |
| 1372 return is_gpu_rasterization_forced_; | 1370 return is_gpu_rasterization_forced_; |
| 1373 } | 1371 } |
| 1374 | 1372 |
| 1375 bool RenderThreadImpl::IsGpuRasterizationEnabled() { | 1373 bool RenderThreadImpl::IsGpuRasterizationEnabled() { |
| 1376 return is_gpu_rasterization_enabled_; | 1374 return is_gpu_rasterization_enabled_; |
| 1377 } | 1375 } |
| 1378 | 1376 |
| 1379 bool RenderThreadImpl::IsThreadedGpuRasterizationEnabled() { | |
| 1380 return is_threaded_gpu_rasterization_enabled_; | |
| 1381 } | |
| 1382 | |
| 1383 int RenderThreadImpl::GetGpuRasterizationMSAASampleCount() { | 1377 int RenderThreadImpl::GetGpuRasterizationMSAASampleCount() { |
| 1384 return gpu_rasterization_msaa_sample_count_; | 1378 return gpu_rasterization_msaa_sample_count_; |
| 1385 } | 1379 } |
| 1386 | 1380 |
| 1387 bool RenderThreadImpl::IsLcdTextEnabled() { | 1381 bool RenderThreadImpl::IsLcdTextEnabled() { |
| 1388 return is_lcd_text_enabled_; | 1382 return is_lcd_text_enabled_; |
| 1389 } | 1383 } |
| 1390 | 1384 |
| 1391 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { | 1385 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { |
| 1392 return is_distance_field_text_enabled_; | 1386 return is_distance_field_text_enabled_; |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 } | 1844 } |
| 1851 | 1845 |
| 1852 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1846 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1853 size_t erased = | 1847 size_t erased = |
| 1854 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1848 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1855 routing_id_); | 1849 routing_id_); |
| 1856 DCHECK_EQ(1u, erased); | 1850 DCHECK_EQ(1u, erased); |
| 1857 } | 1851 } |
| 1858 | 1852 |
| 1859 } // namespace content | 1853 } // namespace content |
| OLD | NEW |