| 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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 // in the future but we avoid it for now to reduce the cost of | 661 // in the future but we avoid it for now to reduce the cost of |
| 662 // Picture::Create. | 662 // Picture::Create. |
| 663 is_gather_pixel_refs_enabled_ = num_raster_threads > 1; | 663 is_gather_pixel_refs_enabled_ = num_raster_threads > 1; |
| 664 | 664 |
| 665 while (compositor_raster_threads_.size() < | 665 while (compositor_raster_threads_.size() < |
| 666 static_cast<size_t>(num_raster_threads)) { | 666 static_cast<size_t>(num_raster_threads)) { |
| 667 scoped_ptr<CompositorRasterThread> raster_thread( | 667 scoped_ptr<CompositorRasterThread> raster_thread( |
| 668 new CompositorRasterThread( | 668 new CompositorRasterThread( |
| 669 compositor_task_graph_runner_.get(), | 669 compositor_task_graph_runner_.get(), |
| 670 base::StringPrintf( | 670 base::StringPrintf( |
| 671 "CompositorWorker%u", | 671 "CompositorTileWorker%u", |
| 672 static_cast<unsigned>(compositor_raster_threads_.size() + 1)) | 672 static_cast<unsigned>(compositor_raster_threads_.size() + 1)) |
| 673 .c_str())); | 673 .c_str())); |
| 674 raster_thread->Start(); | 674 raster_thread->Start(); |
| 675 #if defined(OS_ANDROID) || defined(OS_LINUX) | 675 #if defined(OS_ANDROID) || defined(OS_LINUX) |
| 676 if (!command_line.HasSwitch( | 676 if (!command_line.HasSwitch( |
| 677 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { | 677 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { |
| 678 raster_thread->SetThreadPriority(base::kThreadPriority_Background); | 678 raster_thread->SetThreadPriority(base::kThreadPriority_Background); |
| 679 } | 679 } |
| 680 #endif | 680 #endif |
| 681 compositor_raster_threads_.push_back(raster_thread.Pass()); | 681 compositor_raster_threads_.push_back(raster_thread.Pass()); |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1853 } | 1853 } |
| 1854 | 1854 |
| 1855 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1855 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1856 size_t erased = | 1856 size_t erased = |
| 1857 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1857 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1858 routing_id_); | 1858 routing_id_); |
| 1859 DCHECK_EQ(1u, erased); | 1859 DCHECK_EQ(1u, erased); |
| 1860 } | 1860 } |
| 1861 | 1861 |
| 1862 } // namespace content | 1862 } // namespace content |
| OLD | NEW |