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

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

Issue 1214503002: Increase priority of raster threads on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 // Note: Currently, gathering of pixel refs when using a single 662 // Note: Currently, gathering of pixel refs when using a single
663 // raster thread doesn't provide any benefit. This might change 663 // raster thread doesn't provide any benefit. This might change
664 // in the future but we avoid it for now to reduce the cost of 664 // in the future but we avoid it for now to reduce the cost of
665 // Picture::Create. 665 // Picture::Create.
666 is_gather_pixel_refs_enabled_ = num_raster_threads > 1; 666 is_gather_pixel_refs_enabled_ = num_raster_threads > 1;
667 667
668 base::SimpleThread::Options thread_options; 668 base::SimpleThread::Options thread_options;
669 #if defined(OS_ANDROID) || defined(OS_LINUX) 669 #if defined(OS_ANDROID) || defined(OS_LINUX)
670 if (!command_line.HasSwitch( 670 if (!command_line.HasSwitch(
671 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { 671 switches::kUseNormalPriorityForTileTaskWorkerThreads)) {
672 thread_options.set_priority(base::ThreadPriority::BACKGROUND); 672 thread_options.set_priority(base::ThreadPriority::UI_BACKGROUND);
673 } 673 }
674 #endif 674 #endif
675 while (compositor_raster_threads_.size() < 675 while (compositor_raster_threads_.size() <
676 static_cast<size_t>(num_raster_threads)) { 676 static_cast<size_t>(num_raster_threads)) {
677 scoped_ptr<CompositorRasterThread> raster_thread(new CompositorRasterThread( 677 scoped_ptr<CompositorRasterThread> raster_thread(new CompositorRasterThread(
678 compositor_task_graph_runner_.get(), 678 compositor_task_graph_runner_.get(),
679 base::StringPrintf("CompositorTileWorker%u", 679 base::StringPrintf("CompositorTileWorker%u",
680 static_cast<unsigned>( 680 static_cast<unsigned>(
681 compositor_raster_threads_.size() + 1)).c_str(), 681 compositor_raster_threads_.size() + 1)).c_str(),
682 thread_options)); 682 thread_options));
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 } 1874 }
1875 1875
1876 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1876 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1877 size_t erased = 1877 size_t erased =
1878 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1878 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1879 routing_id_); 1879 routing_id_);
1880 DCHECK_EQ(1u, erased); 1880 DCHECK_EQ(1u, erased);
1881 } 1881 }
1882 1882
1883 } // namespace content 1883 } // namespace content
OLDNEW
« base/threading/platform_thread_win.cc ('K') | « content/renderer/gpu/compositor_output_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698