Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1489233003: TaskGraphRunner Group support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/raster_worker_pool.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 std::string string_value = 749 std::string string_value =
750 command_line.GetSwitchValueASCII(switches::kNumRasterThreads); 750 command_line.GetSwitchValueASCII(switches::kNumRasterThreads);
751 bool parsed_num_raster_threads = 751 bool parsed_num_raster_threads =
752 base::StringToInt(string_value, &num_raster_threads); 752 base::StringToInt(string_value, &num_raster_threads);
753 DCHECK(parsed_num_raster_threads) << string_value; 753 DCHECK(parsed_num_raster_threads) << string_value;
754 DCHECK_GT(num_raster_threads, 0); 754 DCHECK_GT(num_raster_threads, 0);
755 755
756 // Note: Currently, enabling image decode tasks only provides a benefit if 756 // Note: Currently, enabling image decode tasks only provides a benefit if
757 // there's more than one raster thread. This might change in the future but we 757 // there's more than one raster thread. This might change in the future but we
758 // avoid it for now to reduce the cost of recording. 758 // avoid it for now to reduce the cost of recording.
759 are_image_decode_tasks_enabled_ = num_raster_threads > 1; 759 are_image_decode_tasks_enabled_ = true;
760 760
761 base::SimpleThread::Options thread_options; 761 base::SimpleThread::Options thread_options;
762 #if defined(OS_ANDROID) || defined(OS_LINUX) 762 #if defined(OS_ANDROID) || defined(OS_LINUX)
763 if (!command_line.HasSwitch( 763 if (!command_line.HasSwitch(
764 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { 764 switches::kUseNormalPriorityForTileTaskWorkerThreads)) {
765 thread_options.set_priority(base::ThreadPriority::BACKGROUND); 765 thread_options.set_priority(base::ThreadPriority::BACKGROUND);
766 } 766 }
767 #endif 767 #endif
768 768
769 raster_worker_pool_->Start(num_raster_threads, thread_options); 769 raster_worker_pool_->Start(num_raster_threads, thread_options);
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 1992
1993 void RenderThreadImpl::ReleaseFreeMemory() { 1993 void RenderThreadImpl::ReleaseFreeMemory() {
1994 base::allocator::ReleaseFreeMemory(); 1994 base::allocator::ReleaseFreeMemory();
1995 discardable_shared_memory_manager()->ReleaseFreeMemory(); 1995 discardable_shared_memory_manager()->ReleaseFreeMemory();
1996 1996
1997 if (blink_platform_impl_) 1997 if (blink_platform_impl_)
1998 blink::decommitFreeableMemory(); 1998 blink::decommitFreeableMemory();
1999 } 1999 }
2000 2000
2001 } // namespace content 2001 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/raster_worker_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698