1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CC_TEST_TEST_TILE_TASK_RUNNER_H_
6 #define CC_TEST_TEST_TILE_TASK_RUNNER_H_
7 
8 #include "cc/raster/tile_task.h"
9 
10 namespace cc {
11 
12 // This task runner operates on single task. User has to call respective
13 // functions to operate on task.
14 class TestTileTaskRunner {
15  public:
16   // Schedules, runs and completes the task.
17   static void ProcessTask(TileTask* task);
18 
19   static void ScheduleTask(TileTask* task);
20   static void CancelTask(TileTask* task);
21 
22   // Before running the task it must be scheduled. Call ScheduleTask() before
23   // calling this function. This starts, runs and finishes the task.
24   static void RunTask(TileTask* task);
25 
26   // Before completing the task it must be canceled or finished by running. Call
27   // RunTask() or CancelTask before calling this function.
28   static void CompleteTask(TileTask* task);
29 };
30 
31 }  // namespace cc
32 
33 #endif  // CC_TEST_TEST_TILE_TASK_RUNNER_H_
34