Index: cc/tiles/tile_manager_unittest.cc |
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc |
index 745fee4ca853a48a593c4839a87b8a14602f1d63..074240ed88222c46337af741320660478a802cb7 100644 |
--- a/cc/tiles/tile_manager_unittest.cc |
+++ b/cc/tiles/tile_manager_unittest.cc |
@@ -9,7 +9,6 @@ |
#include "base/thread_task_runner_handle.h" |
#include "cc/playback/raster_source.h" |
#include "cc/playback/recording_source.h" |
-#include "cc/raster/raster_buffer.h" |
#include "cc/resources/resource_pool.h" |
#include "cc/test/begin_frame_args_test.h" |
#include "cc/test/fake_impl_task_runner_provider.h" |
@@ -1820,11 +1819,21 @@ TEST_F(TileManagerTest, LowResHasNoImage) { |
} |
// Fake TileTaskRunner that just no-ops all calls. |
-class FakeTileTaskRunner : public TileTaskRunner, public TileTaskClient { |
+class FakeTileTaskRunner : public TileTaskRunner { |
public: |
FakeTileTaskRunner() {} |
~FakeTileTaskRunner() override {} |
+ // RasterBufferProvider methods. |
+ scoped_ptr<RasterBuffer> AcquireBufferForRaster( |
+ const Resource* resource, |
+ uint64_t resource_content_id, |
+ uint64_t previous_content_id) override { |
+ NOTREACHED(); |
+ return nullptr; |
+ } |
+ void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {} |
+ |
// TileTaskRunner methods. |
void Shutdown() override {} |
void CheckForCompletedTasks() override {} |
@@ -1836,16 +1845,6 @@ class FakeTileTaskRunner : public TileTaskRunner, public TileTaskClient { |
} |
void ScheduleTasks(TaskGraph* graph) override {} |
- |
- // TileTaskClient methods. |
- scoped_ptr<RasterBuffer> AcquireBufferForRaster( |
- const Resource* resource, |
- uint64_t resource_content_id, |
- uint64_t previous_content_id) override { |
- NOTREACHED(); |
- return nullptr; |
- } |
- void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {} |
}; |
// Fake TileTaskRunner that just cancels all scheduled tasks immediately. |
@@ -1858,7 +1857,7 @@ class CancellingTileTaskRunner : public FakeTileTaskRunner { |
// Just call CompleteOnOriginThread on each item in the queue. As none of |
// these items have run yet, they will be treated as cancelled tasks. |
for (const auto& node : graph->nodes) { |
- static_cast<TileTask*>(node.task)->CompleteOnOriginThread(this); |
+ node.task->CompleteOnOriginThread(); |
} |
} |
}; |
@@ -1931,17 +1930,7 @@ class VerifyResourceContentIdTileTaskRunner : public FakeTileTaskRunner { |
: expected_resource_id_(expected_resource_id) {} |
~VerifyResourceContentIdTileTaskRunner() override {} |
- void ScheduleTasks(TaskGraph* graph) override { |
- for (const auto& node : graph->nodes) { |
- TileTask* task = static_cast<TileTask*>(node.task); |
- // Triggers a call to AcquireBufferForRaster. |
- task->ScheduleOnOriginThread(this); |
- // Calls TileManager as though task was cancelled. |
- task->CompleteOnOriginThread(this); |
- } |
- } |
- |
- // TileTaskClient methods. |
+ // RasterBufferProvider methods. |
scoped_ptr<RasterBuffer> AcquireBufferForRaster( |
const Resource* resource, |
uint64_t resource_content_id, |
@@ -1950,6 +1939,16 @@ class VerifyResourceContentIdTileTaskRunner : public FakeTileTaskRunner { |
return nullptr; |
} |
+ void ScheduleTasks(TaskGraph* graph) override { |
+ for (const auto& node : graph->nodes) { |
+ Task* task = node.task; |
+ // Triggers a call to AcquireBufferForRaster. |
+ task->ScheduleOnOriginThread(); |
+ // Calls TileManager as though task was cancelled. |
+ task->CompleteOnOriginThread(); |
+ } |
+ } |
+ |
private: |
uint64_t expected_resource_id_; |
}; |