diff options
author | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-17 23:12:36 +0000 |
---|---|---|
committer | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-17 23:12:36 +0000 |
commit | 609b60bf1660e735b228e8e1e652c55069047248 (patch) | |
tree | bf51c4dc5dfbcfb1bf86daf49c2d5dfdbf4a7bac /cc/debug | |
parent | f31cf7bf95f70d41e183fca70cb9a1cfe86e2850 (diff) | |
download | chromium_src-609b60bf1660e735b228e8e1e652c55069047248.zip chromium_src-609b60bf1660e735b228e8e1e652c55069047248.tar.gz chromium_src-609b60bf1660e735b228e8e1e652c55069047248.tar.bz2 |
cc: Refactor and cleanup of TaskGraphRunner class.
This removes the details related to picture cloning from the
base TaskGraphRunner class and gives derived classes control
over the worker threads used to run tasks.
TEST=cc_unittests --gtest_filter=TaskGraphRunner*
BUG=316685
Review URL: https://codereview.chromium.org/200193006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257521 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/debug')
-rw-r--r-- | cc/debug/rasterize_and_record_benchmark_impl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc index e6c831a..b764535 100644 --- a/cc/debug/rasterize_and_record_benchmark_impl.cc +++ b/cc/debug/rasterize_and_record_benchmark_impl.cc @@ -42,9 +42,9 @@ class BenchmarkRasterTask : public internal::Task { best_time_(base::TimeDelta::Max()) {} // Overridden from internal::Task: - virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE { - PicturePileImpl* picture_pile = - picture_pile_->GetCloneForDrawingOnThread(thread_index); + virtual void RunOnWorkerThread() OVERRIDE { + PicturePileImpl* picture_pile = picture_pile_->GetCloneForDrawingOnThread( + RasterWorkerPool::GetPictureCloneIndexForCurrentThread()); for (size_t i = 0; i < repeat_count_; ++i) { SkBitmap bitmap; @@ -176,7 +176,7 @@ void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) { RasterWorkerPool::kBenchmarkRasterTaskPriority, 0u)); - task_graph_runner->SetTaskGraph(task_namespace_, &graph); + task_graph_runner->ScheduleTasks(task_namespace_, &graph); task_graph_runner->WaitForTasksToFinishRunning(task_namespace_); internal::Task::Vector completed_tasks; |