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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 base::DiscardableMemory::SetPreferredType(type); | 657 base::DiscardableMemory::SetPreferredType(type); |
658 | 658 |
659 if (is_impl_side_painting_enabled_) { | 659 if (is_impl_side_painting_enabled_) { |
660 int num_raster_threads = 0; | 660 int num_raster_threads = 0; |
661 std::string string_value = | 661 std::string string_value = |
662 command_line.GetSwitchValueASCII(switches::kNumRasterThreads); | 662 command_line.GetSwitchValueASCII(switches::kNumRasterThreads); |
663 bool parsed_num_raster_threads = | 663 bool parsed_num_raster_threads = |
664 base::StringToInt(string_value, &num_raster_threads); | 664 base::StringToInt(string_value, &num_raster_threads); |
665 DCHECK(parsed_num_raster_threads) << string_value; | 665 DCHECK(parsed_num_raster_threads) << string_value; |
666 DCHECK_GT(num_raster_threads, 0); | 666 DCHECK_GT(num_raster_threads, 0); |
| 667 |
| 668 // Force maximum 1 thread for threaded GPU rasterization. |
| 669 if (is_threaded_gpu_rasterization_enabled_) |
| 670 num_raster_threads = 1; |
667 cc::TileTaskWorkerPool::SetNumWorkerThreads(num_raster_threads); | 671 cc::TileTaskWorkerPool::SetNumWorkerThreads(num_raster_threads); |
668 | 672 |
669 #if defined(OS_ANDROID) || defined(OS_LINUX) | 673 #if defined(OS_ANDROID) || defined(OS_LINUX) |
670 if (!command_line.HasSwitch( | 674 if (!command_line.HasSwitch( |
671 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { | 675 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { |
672 cc::TileTaskWorkerPool::SetWorkerThreadPriority( | 676 cc::TileTaskWorkerPool::SetWorkerThreadPriority( |
673 base::kThreadPriority_Background); | 677 base::kThreadPriority_Background); |
674 } | 678 } |
675 #endif | 679 #endif |
676 } | 680 } |
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1822 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 1826 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
1823 mojo::ServiceProviderPtr exposed_services) | 1827 mojo::ServiceProviderPtr exposed_services) |
1824 : services(services.Pass()), | 1828 : services(services.Pass()), |
1825 exposed_services(exposed_services.Pass()) { | 1829 exposed_services(exposed_services.Pass()) { |
1826 } | 1830 } |
1827 | 1831 |
1828 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { | 1832 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { |
1829 } | 1833 } |
1830 | 1834 |
1831 } // namespace content | 1835 } // namespace content |
OLD | NEW |