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