Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Side by Side Diff: cc/tiles/tile_task_manager.h

Issue 1866043006: cc: Remove ScheduleOnOriginThread() and CompleteOnOriginThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed bug 613529 Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TILES_TILE_TASK_MANAGER_H_ 5 #ifndef CC_TILES_TILE_TASK_MANAGER_H_
6 #define CC_TILES_TILE_TASK_MANAGER_H_ 6 #define CC_TILES_TILE_TASK_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "cc/raster/raster_buffer_provider.h" 10 #include "cc/raster/raster_buffer_provider.h"
(...skipping 10 matching lines...) Expand all
21 TileTaskManager(); 21 TileTaskManager();
22 virtual ~TileTaskManager(); 22 virtual ~TileTaskManager();
23 23
24 // Schedule running of tile tasks in |graph| and all dependencies. 24 // Schedule running of tile tasks in |graph| and all dependencies.
25 // Previously scheduled tasks that are not in |graph| will be canceled unless 25 // Previously scheduled tasks that are not in |graph| will be canceled unless
26 // already running. Once scheduled, reply callbacks are guaranteed to run for 26 // already running. Once scheduled, reply callbacks are guaranteed to run for
27 // all tasks even if they later get canceled by another call to 27 // all tasks even if they later get canceled by another call to
28 // ScheduleTasks(). 28 // ScheduleTasks().
29 virtual void ScheduleTasks(TaskGraph* graph) = 0; 29 virtual void ScheduleTasks(TaskGraph* graph) = 0;
30 30
31 // Check for completed tasks and dispatch reply callbacks. 31 // Check for completed tasks.
vmpstr 2016/05/21 00:02:14 you should keep "and call OnTaskCompleted on them"
prashant.n 2016/05/21 00:51:45 Ok. I'll modify.
32 virtual void CheckForCompletedTasks() = 0; 32 virtual void CheckForCompletedTasks() = 0;
33 33
34 // Shutdown after canceling all previously scheduled tasks. Reply callbacks 34 // Shutdown after canceling all previously scheduled tasks.
35 // are still guaranteed to run when CheckForCompletedTasks() is called.
36 virtual void Shutdown() = 0; 35 virtual void Shutdown() = 0;
37 36
38 // Get RasterBufferProvider. 37 // Get RasterBufferProvider.
39 virtual RasterBufferProvider* GetRasterBufferProvider() const = 0; 38 virtual RasterBufferProvider* GetRasterBufferProvider() const = 0;
40 }; 39 };
41 40
42 class CC_EXPORT TileTaskManagerImpl : public TileTaskManager { 41 class CC_EXPORT TileTaskManagerImpl : public TileTaskManager {
43 public: 42 public:
44 ~TileTaskManagerImpl() override; 43 ~TileTaskManagerImpl() override;
45 44
46 static std::unique_ptr<TileTaskManagerImpl> Create( 45 static std::unique_ptr<TileTaskManagerImpl> Create(
47 std::unique_ptr<RasterBufferProvider> raster_buffer_provider, 46 std::unique_ptr<RasterBufferProvider> raster_buffer_provider,
48 TaskGraphRunner* task_graph_runner); 47 TaskGraphRunner* task_graph_runner);
49 48
50 // Overridden from TileTaskManager: 49 // Overridden from TileTaskManager:
51 void ScheduleTasks(TaskGraph* graph) override; 50 void ScheduleTasks(TaskGraph* graph) override;
52 void CheckForCompletedTasks() override; 51 void CheckForCompletedTasks() override;
53 void Shutdown() override; 52 void Shutdown() override;
54 RasterBufferProvider* GetRasterBufferProvider() const override; 53 RasterBufferProvider* GetRasterBufferProvider() const override;
55 54
56 protected: 55 protected:
57 TileTaskManagerImpl( 56 TileTaskManagerImpl(
58 std::unique_ptr<RasterBufferProvider> raster_buffer_provider, 57 std::unique_ptr<RasterBufferProvider> raster_buffer_provider,
59 TaskGraphRunner* task_graph_runner); 58 TaskGraphRunner* task_graph_runner);
60 59
61 std::unique_ptr<RasterBufferProvider> raster_buffer_provider_; 60 std::unique_ptr<RasterBufferProvider> raster_buffer_provider_;
62 TaskGraphRunner* task_graph_runner_; 61 TaskGraphRunner* task_graph_runner_;
63 const NamespaceToken namespace_token_; 62 const NamespaceToken namespace_token_;
64 Task::Vector completed_tasks_;
65 63
66 private: 64 private:
67 DISALLOW_COPY_AND_ASSIGN(TileTaskManagerImpl); 65 DISALLOW_COPY_AND_ASSIGN(TileTaskManagerImpl);
68 }; 66 };
69 67
70 } // namespace cc 68 } // namespace cc
71 69
72 #endif // CC_TILES_TILE_TASK_MANAGER_H_ 70 #endif // CC_TILES_TILE_TASK_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698