Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 481d5baeaedce5875709d8be32da4a9ddaeeef93..0c0dc15bd3dae4c02ad81d36d1109df560ab813b 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -266,11 +266,11 @@ class RenderViewZoomer : public RenderViewVisitor { |
DISALLOW_COPY_AND_ASSIGN(RenderViewZoomer); |
}; |
-class CompositorRasterThread : public base::SimpleThread { |
+class WorkerThread : public base::SimpleThread { |
public: |
- CompositorRasterThread(cc::TaskGraphRunner* task_graph_runner, |
- const std::string& name_prefix, |
- base::SimpleThread::Options options) |
+ WorkerThread(cc::TaskGraphRunner* task_graph_runner, |
+ const std::string& name_prefix, |
+ base::SimpleThread::Options options) |
: base::SimpleThread(name_prefix, options), |
task_graph_runner_(task_graph_runner) {} |
@@ -280,7 +280,7 @@ class CompositorRasterThread : public base::SimpleThread { |
private: |
cc::TaskGraphRunner* task_graph_runner_; |
- DISALLOW_COPY_AND_ASSIGN(CompositorRasterThread); |
+ DISALLOW_COPY_AND_ASSIGN(WorkerThread); |
}; |
std::string HostToCustomHistogramSuffix(const std::string& host) { |
@@ -647,23 +647,23 @@ void RenderThreadImpl::Init() { |
memory_pressure_listener_.reset(new base::MemoryPressureListener( |
base::Bind(&RenderThreadImpl::OnMemoryPressure, base::Unretained(this)))); |
- compositor_task_graph_runner_.reset(new cc::TaskGraphRunner); |
+ task_graph_runner_.reset(new cc::TaskGraphRunner); |
is_gather_pixel_refs_enabled_ = false; |
- int num_raster_threads = 0; |
+ int num_worker_threads = 0; |
std::string string_value = |
- command_line.GetSwitchValueASCII(switches::kNumRasterThreads); |
- bool parsed_num_raster_threads = |
- base::StringToInt(string_value, &num_raster_threads); |
- DCHECK(parsed_num_raster_threads) << string_value; |
- DCHECK_GT(num_raster_threads, 0); |
+ command_line.GetSwitchValueASCII(switches::kNumWorkerThreads); |
+ bool parsed_num_worker_threads = |
+ base::StringToInt(string_value, &num_worker_threads); |
+ DCHECK(parsed_num_worker_threads) << string_value; |
+ DCHECK_GT(num_worker_threads, 0); |
// Note: Currently, gathering of pixel refs when using a single |
- // raster thread doesn't provide any benefit. This might change |
+ // worker thread doesn't provide any benefit. This might change |
// in the future but we avoid it for now to reduce the cost of |
// Picture::Create. |
- is_gather_pixel_refs_enabled_ = num_raster_threads > 1; |
+ is_gather_pixel_refs_enabled_ = num_worker_threads > 1; |
base::SimpleThread::Options thread_options; |
#if defined(OS_ANDROID) || defined(OS_LINUX) |
@@ -672,16 +672,14 @@ void RenderThreadImpl::Init() { |
thread_options.set_priority(base::ThreadPriority::BACKGROUND); |
} |
#endif |
- while (compositor_raster_threads_.size() < |
- static_cast<size_t>(num_raster_threads)) { |
- scoped_ptr<CompositorRasterThread> raster_thread(new CompositorRasterThread( |
- compositor_task_graph_runner_.get(), |
- base::StringPrintf("CompositorTileWorker%u", |
- static_cast<unsigned>( |
- compositor_raster_threads_.size() + 1)).c_str(), |
+ while (worker_threads_.size() < static_cast<size_t>(num_worker_threads)) { |
+ scoped_ptr<WorkerThread> worker_thread(new WorkerThread( |
+ task_graph_runner_.get(), |
+ base::StringPrintf("Worker%u", static_cast<unsigned>( |
+ worker_threads_.size() + 1)).c_str(), |
thread_options)); |
- raster_thread->Start(); |
- compositor_raster_threads_.push_back(raster_thread.Pass()); |
+ worker_thread->Start(); |
+ worker_threads_.push_back(worker_thread.Pass()); |
} |
// In single process, browser main loop set up the discardable memory |
@@ -762,13 +760,13 @@ void RenderThreadImpl::Shutdown() { |
compositor_thread_.reset(); |
- // Shutdown raster threads. |
- compositor_task_graph_runner_->Shutdown(); |
- while (!compositor_raster_threads_.empty()) { |
- compositor_raster_threads_.back()->Join(); |
- compositor_raster_threads_.pop_back(); |
+ // Shutdown worker threads. |
+ task_graph_runner_->Shutdown(); |
+ while (!worker_threads_.empty()) { |
+ worker_threads_.back()->Join(); |
+ worker_threads_.pop_back(); |
} |
- compositor_task_graph_runner_.reset(); |
+ task_graph_runner_.reset(); |
main_input_callback_.Cancel(); |
input_handler_manager_.reset(); |
@@ -1454,7 +1452,7 @@ RenderThreadImpl::CreateExternalBeginFrameSource(int routing_id) { |
} |
cc::TaskGraphRunner* RenderThreadImpl::GetTaskGraphRunner() { |
- return compositor_task_graph_runner_.get(); |
+ return task_graph_runner_.get(); |
} |
bool RenderThreadImpl::IsGatherPixelRefsEnabled() { |