summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_tile_manager.cc
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-24 02:20:20 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-24 02:20:20 +0000
commit71e99e88b2c86c91a44cee2c0f09f50f2ba7494f (patch)
tree8727d91757006d43afb37ab5f2d5bd81ea87f40c /cc/test/fake_tile_manager.cc
parent61f9908f6732c769e0dfa5f9c53c740bf98a17ce (diff)
downloadchromium_src-71e99e88b2c86c91a44cee2c0f09f50f2ba7494f.zip
chromium_src-71e99e88b2c86c91a44cee2c0f09f50f2ba7494f.tar.gz
chromium_src-71e99e88b2c86c91a44cee2c0f09f50f2ba7494f.tar.bz2
Re-land: cc: Cleanup internal::WorkerPoolTaskClient interface.
::CompleteOnOriginThread is now called when RasterWorkerPool has completed all necessary initialization of resource, including texture uploads. This improves the WorkerPoolTask/Client interface significantly and will allow better resource recycling once ::RunReplyOnOriginThread is removed. BUG=269841 Review URL: https://codereview.chromium.org/170783007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252874 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_tile_manager.cc')
-rw-r--r--cc/test/fake_tile_manager.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/cc/test/fake_tile_manager.cc b/cc/test/fake_tile_manager.cc
index a0d03df..cbd09f2 100644
--- a/cc/test/fake_tile_manager.cc
+++ b/cc/test/fake_tile_manager.cc
@@ -25,6 +25,8 @@ class FakeRasterWorkerPool : public RasterWorkerPool {
++it) {
internal::RasterWorkerPoolTask* task = it->task;
+ task->WillSchedule();
+ task->ScheduleOnOriginThread(this);
task->DidSchedule();
completed_tasks_.push_back(task);
@@ -35,7 +37,9 @@ class FakeRasterWorkerPool : public RasterWorkerPool {
internal::WorkerPoolTask* task = completed_tasks_.front().get();
task->WillComplete();
+ task->CompleteOnOriginThread(this);
task->DidComplete();
+
task->RunReplyOnOriginThread();
completed_tasks_.pop_front();
@@ -49,15 +53,12 @@ class FakeRasterWorkerPool : public RasterWorkerPool {
}
// Overridden from internal::WorkerPoolTaskClient:
- virtual SkCanvas* AcquireCanvasForRaster(internal::RasterWorkerPoolTask* task)
- OVERRIDE {
+ virtual SkCanvas* AcquireCanvasForRaster(internal::WorkerPoolTask* task,
+ const Resource* resource) OVERRIDE {
return NULL;
}
- virtual void OnRasterCompleted(internal::RasterWorkerPoolTask* task,
- const PicturePileImpl::Analysis& analysis)
- OVERRIDE {}
- virtual void OnImageDecodeCompleted(internal::WorkerPoolTask* task) OVERRIDE {
- }
+ virtual void ReleaseCanvasForRaster(internal::WorkerPoolTask* task,
+ const Resource* resource) OVERRIDE {}
private:
// Overridden from RasterWorkerPool: