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 <utility> | 10 #include <utility> |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 } else if (command_line.HasSwitch(switches::kEnableLCDText)) { | 770 } else if (command_line.HasSwitch(switches::kEnableLCDText)) { |
771 is_lcd_text_enabled_ = true; | 771 is_lcd_text_enabled_ = true; |
772 } else { | 772 } else { |
773 #if defined(OS_ANDROID) | 773 #if defined(OS_ANDROID) |
774 is_lcd_text_enabled_ = false; | 774 is_lcd_text_enabled_ = false; |
775 #else | 775 #else |
776 is_lcd_text_enabled_ = true; | 776 is_lcd_text_enabled_ = true; |
777 #endif | 777 #endif |
778 } | 778 } |
779 | 779 |
780 is_gpu_rasterization_enabled_ = | |
781 command_line.HasSwitch(switches::kEnableGpuRasterization); | |
782 is_gpu_rasterization_forced_ = | 780 is_gpu_rasterization_forced_ = |
783 command_line.HasSwitch(switches::kForceGpuRasterization); | 781 command_line.HasSwitch(switches::kForceGpuRasterization); |
784 is_async_worker_context_enabled_ = | 782 is_async_worker_context_enabled_ = |
785 command_line.HasSwitch(switches::kEnableGpuAsyncWorkerContext); | 783 command_line.HasSwitch(switches::kEnableGpuAsyncWorkerContext); |
786 | 784 |
787 if (command_line.HasSwitch(switches::kGpuRasterizationMSAASampleCount)) { | 785 if (command_line.HasSwitch(switches::kGpuRasterizationMSAASampleCount)) { |
788 std::string string_value = command_line.GetSwitchValueASCII( | 786 std::string string_value = command_line.GetSwitchValueASCII( |
789 switches::kGpuRasterizationMSAASampleCount); | 787 switches::kGpuRasterizationMSAASampleCount); |
790 bool parsed_msaa_sample_count = | 788 bool parsed_msaa_sample_count = |
791 base::StringToInt(string_value, &gpu_rasterization_msaa_sample_count_); | 789 base::StringToInt(string_value, &gpu_rasterization_msaa_sample_count_); |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 if (associated_interfaces_.CanBindRequest(name)) | 1486 if (associated_interfaces_.CanBindRequest(name)) |
1489 associated_interfaces_.BindRequest(name, std::move(handle)); | 1487 associated_interfaces_.BindRequest(name, std::move(handle)); |
1490 else | 1488 else |
1491 ChildThreadImpl::OnAssociatedInterfaceRequest(name, std::move(handle)); | 1489 ChildThreadImpl::OnAssociatedInterfaceRequest(name, std::move(handle)); |
1492 } | 1490 } |
1493 | 1491 |
1494 bool RenderThreadImpl::IsGpuRasterizationForced() { | 1492 bool RenderThreadImpl::IsGpuRasterizationForced() { |
1495 return is_gpu_rasterization_forced_; | 1493 return is_gpu_rasterization_forced_; |
1496 } | 1494 } |
1497 | 1495 |
1498 bool RenderThreadImpl::IsGpuRasterizationEnabled() { | |
1499 return is_gpu_rasterization_enabled_; | |
1500 } | |
1501 | |
1502 bool RenderThreadImpl::IsAsyncWorkerContextEnabled() { | 1496 bool RenderThreadImpl::IsAsyncWorkerContextEnabled() { |
1503 return is_async_worker_context_enabled_; | 1497 return is_async_worker_context_enabled_; |
1504 } | 1498 } |
1505 | 1499 |
1506 int RenderThreadImpl::GetGpuRasterizationMSAASampleCount() { | 1500 int RenderThreadImpl::GetGpuRasterizationMSAASampleCount() { |
1507 return gpu_rasterization_msaa_sample_count_; | 1501 return gpu_rasterization_msaa_sample_count_; |
1508 } | 1502 } |
1509 | 1503 |
1510 bool RenderThreadImpl::IsLcdTextEnabled() { | 1504 bool RenderThreadImpl::IsLcdTextEnabled() { |
1511 return is_lcd_text_enabled_; | 1505 return is_lcd_text_enabled_; |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 } | 2432 } |
2439 } | 2433 } |
2440 | 2434 |
2441 void RenderThreadImpl::OnRendererInterfaceRequest( | 2435 void RenderThreadImpl::OnRendererInterfaceRequest( |
2442 mojom::RendererAssociatedRequest request) { | 2436 mojom::RendererAssociatedRequest request) { |
2443 DCHECK(!renderer_binding_.is_bound()); | 2437 DCHECK(!renderer_binding_.is_bound()); |
2444 renderer_binding_.Bind(std::move(request)); | 2438 renderer_binding_.Bind(std::move(request)); |
2445 } | 2439 } |
2446 | 2440 |
2447 } // namespace content | 2441 } // namespace content |
OLD | NEW |