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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 if (command_line.HasSwitch(switches::kGpuRasterizationMSAASampleCount)) { | 591 if (command_line.HasSwitch(switches::kGpuRasterizationMSAASampleCount)) { |
592 std::string string_value = command_line.GetSwitchValueASCII( | 592 std::string string_value = command_line.GetSwitchValueASCII( |
593 switches::kGpuRasterizationMSAASampleCount); | 593 switches::kGpuRasterizationMSAASampleCount); |
594 bool parsed_msaa_sample_count = | 594 bool parsed_msaa_sample_count = |
595 base::StringToInt(string_value, &gpu_rasterization_msaa_sample_count_); | 595 base::StringToInt(string_value, &gpu_rasterization_msaa_sample_count_); |
596 DCHECK(parsed_msaa_sample_count) << string_value; | 596 DCHECK(parsed_msaa_sample_count) << string_value; |
597 DCHECK_GE(gpu_rasterization_msaa_sample_count_, 0); | 597 DCHECK_GE(gpu_rasterization_msaa_sample_count_, 0); |
598 } else { | 598 } else { |
599 gpu_rasterization_msaa_sample_count_ = 0; | 599 gpu_rasterization_msaa_sample_count_ = 0; |
600 } | 600 } |
| 601 is_threaded_gpu_rasterization_enabled_ = |
| 602 command_line.HasSwitch(switches::kEnableThreadedGpuRasterization); |
601 | 603 |
602 if (command_line.HasSwitch(switches::kDisableDistanceFieldText)) { | 604 if (command_line.HasSwitch(switches::kDisableDistanceFieldText)) { |
603 is_distance_field_text_enabled_ = false; | 605 is_distance_field_text_enabled_ = false; |
604 } else if (command_line.HasSwitch(switches::kEnableDistanceFieldText)) { | 606 } else if (command_line.HasSwitch(switches::kEnableDistanceFieldText)) { |
605 is_distance_field_text_enabled_ = true; | 607 is_distance_field_text_enabled_ = true; |
606 } else { | 608 } else { |
607 is_distance_field_text_enabled_ = false; | 609 is_distance_field_text_enabled_ = false; |
608 } | 610 } |
609 | 611 |
610 // Note that under Linux, the media library will normally already have | 612 // Note that under Linux, the media library will normally already have |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 } | 1352 } |
1351 | 1353 |
1352 bool RenderThreadImpl::IsGpuRasterizationForced() { | 1354 bool RenderThreadImpl::IsGpuRasterizationForced() { |
1353 return is_gpu_rasterization_forced_; | 1355 return is_gpu_rasterization_forced_; |
1354 } | 1356 } |
1355 | 1357 |
1356 bool RenderThreadImpl::IsGpuRasterizationEnabled() { | 1358 bool RenderThreadImpl::IsGpuRasterizationEnabled() { |
1357 return is_gpu_rasterization_enabled_; | 1359 return is_gpu_rasterization_enabled_; |
1358 } | 1360 } |
1359 | 1361 |
| 1362 bool RenderThreadImpl::IsThreadedGpuRasterizationEnabled() { |
| 1363 return is_threaded_gpu_rasterization_enabled_; |
| 1364 } |
| 1365 |
1360 int RenderThreadImpl::GetGpuRasterizationMSAASampleCount() { | 1366 int RenderThreadImpl::GetGpuRasterizationMSAASampleCount() { |
1361 return gpu_rasterization_msaa_sample_count_; | 1367 return gpu_rasterization_msaa_sample_count_; |
1362 } | 1368 } |
1363 | 1369 |
1364 bool RenderThreadImpl::IsLcdTextEnabled() { | 1370 bool RenderThreadImpl::IsLcdTextEnabled() { |
1365 return is_lcd_text_enabled_; | 1371 return is_lcd_text_enabled_; |
1366 } | 1372 } |
1367 | 1373 |
1368 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { | 1374 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { |
1369 return is_distance_field_text_enabled_; | 1375 return is_distance_field_text_enabled_; |
(...skipping 12 matching lines...) Expand all Loading... |
1382 } | 1388 } |
1383 | 1389 |
1384 bool RenderThreadImpl::UseSingleThreadScheduler() { | 1390 bool RenderThreadImpl::UseSingleThreadScheduler() { |
1385 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 1391 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
1386 return !cmd->HasSwitch(switches::kDisableSingleThreadProxyScheduler); | 1392 return !cmd->HasSwitch(switches::kDisableSingleThreadProxyScheduler); |
1387 } | 1393 } |
1388 | 1394 |
1389 uint32 RenderThreadImpl::GetImageTextureTarget() { | 1395 uint32 RenderThreadImpl::GetImageTextureTarget() { |
1390 return use_image_texture_target_; | 1396 return use_image_texture_target_; |
1391 } | 1397 } |
| 1398 |
1392 scoped_refptr<base::SingleThreadTaskRunner> | 1399 scoped_refptr<base::SingleThreadTaskRunner> |
1393 RenderThreadImpl::GetCompositorMainThreadTaskRunner() { | 1400 RenderThreadImpl::GetCompositorMainThreadTaskRunner() { |
1394 return main_thread_compositor_task_runner_; | 1401 return main_thread_compositor_task_runner_; |
1395 } | 1402 } |
1396 | 1403 |
1397 scoped_refptr<base::SingleThreadTaskRunner> | 1404 scoped_refptr<base::SingleThreadTaskRunner> |
1398 RenderThreadImpl::GetCompositorImplThreadTaskRunner() { | 1405 RenderThreadImpl::GetCompositorImplThreadTaskRunner() { |
1399 return compositor_message_loop_proxy_; | 1406 return compositor_message_loop_proxy_; |
1400 } | 1407 } |
1401 | 1408 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1809 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 1816 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
1810 mojo::ServiceProviderPtr exposed_services) | 1817 mojo::ServiceProviderPtr exposed_services) |
1811 : services(services.Pass()), | 1818 : services(services.Pass()), |
1812 exposed_services(exposed_services.Pass()) { | 1819 exposed_services(exposed_services.Pass()) { |
1813 } | 1820 } |
1814 | 1821 |
1815 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { | 1822 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { |
1816 } | 1823 } |
1817 | 1824 |
1818 } // namespace content | 1825 } // namespace content |
OLD | NEW |