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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 | 666 |
667 // Force maximum 1 thread for threaded GPU rasterization. | 667 // Force maximum 1 thread for threaded GPU rasterization. |
668 // TODO(vmiura): crbug.com/459760 Support existence of multiple raster | 668 // TODO(vmiura): crbug.com/459760 Support existence of multiple raster |
669 // threads in GPU raster mode. | 669 // threads in GPU raster mode. |
670 if (is_threaded_gpu_rasterization_enabled_) | 670 if (is_threaded_gpu_rasterization_enabled_) |
671 num_raster_threads = 1; | 671 num_raster_threads = 1; |
672 cc::TileTaskWorkerPool::SetNumWorkerThreads(num_raster_threads); | 672 |
673 // In single process, browser compositor already initialized and set up | |
674 // worker threads, can't change the number later for the renderer compistor | |
675 // in the same process. | |
676 if (!command_line.HasSwitch(switches::kSingleProcess)) | |
enne (OOO)
2015/03/02 22:01:27
danakj also suggests via proxy enne that this coul
weiliangc
2015/03/02 22:37:22
https://codereview.chromium.org/971943002/
| |
677 cc::TileTaskWorkerPool::SetNumWorkerThreads(num_raster_threads); | |
673 | 678 |
674 #if defined(OS_ANDROID) || defined(OS_LINUX) | 679 #if defined(OS_ANDROID) || defined(OS_LINUX) |
675 if (!command_line.HasSwitch( | 680 if (!command_line.HasSwitch( |
676 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { | 681 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { |
677 cc::TileTaskWorkerPool::SetWorkerThreadPriority( | 682 cc::TileTaskWorkerPool::SetWorkerThreadPriority( |
678 base::kThreadPriority_Background); | 683 base::kThreadPriority_Background); |
679 } | 684 } |
680 #endif | 685 #endif |
681 } | 686 } |
682 | 687 |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1827 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 1832 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
1828 mojo::ServiceProviderPtr exposed_services) | 1833 mojo::ServiceProviderPtr exposed_services) |
1829 : services(services.Pass()), | 1834 : services(services.Pass()), |
1830 exposed_services(exposed_services.Pass()) { | 1835 exposed_services(exposed_services.Pass()) { |
1831 } | 1836 } |
1832 | 1837 |
1833 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { | 1838 RenderThreadImpl::PendingRenderFrameConnect::~PendingRenderFrameConnect() { |
1834 } | 1839 } |
1835 | 1840 |
1836 } // namespace content | 1841 } // namespace content |
OLD | NEW |