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

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

Issue 2106503002: Revert of cc: Add mailbox support to ResourceProvider write locks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@worker_context_sync_tokens_revert
Patch Set: Created 4 years, 5 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
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/tiles/tile_task_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 14 matching lines...) Expand all
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 and if not canceled by next scheduling, 26 // already running. Once scheduled and if not canceled by next scheduling,
27 // tasks are guaranteed to run. 27 // tasks are guaranteed to run.
28 virtual void ScheduleTasks(TaskGraph* graph) = 0; 28 virtual void ScheduleTasks(TaskGraph* graph) = 0;
29 29
30 // Check for completed tasks and call OnTaskCompleted() on them. 30 // Check for completed tasks and call OnTaskCompleted() on them.
31 virtual void CheckForCompletedTasks() = 0; 31 virtual void CheckForCompletedTasks() = 0;
32 32
33 // Shutdown after canceling all previously scheduled tasks. 33 // Shutdown after canceling all previously scheduled tasks.
34 virtual void Shutdown() = 0; 34 virtual void Shutdown() = 0;
35
36 // Get RasterBufferProvider.
37 virtual RasterBufferProvider* GetRasterBufferProvider() const = 0;
35 }; 38 };
36 39
37 class CC_EXPORT TileTaskManagerImpl : public TileTaskManager { 40 class CC_EXPORT TileTaskManagerImpl : public TileTaskManager {
38 public: 41 public:
39 ~TileTaskManagerImpl() override; 42 ~TileTaskManagerImpl() override;
40 43
41 static std::unique_ptr<TileTaskManagerImpl> Create( 44 static std::unique_ptr<TileTaskManagerImpl> Create(
45 std::unique_ptr<RasterBufferProvider> raster_buffer_provider,
42 TaskGraphRunner* task_graph_runner); 46 TaskGraphRunner* task_graph_runner);
43 47
44 // Overridden from TileTaskManager: 48 // Overridden from TileTaskManager:
45 void ScheduleTasks(TaskGraph* graph) override; 49 void ScheduleTasks(TaskGraph* graph) override;
46 void CheckForCompletedTasks() override; 50 void CheckForCompletedTasks() override;
47 void Shutdown() override; 51 void Shutdown() override;
52 RasterBufferProvider* GetRasterBufferProvider() const override;
48 53
49 protected: 54 protected:
50 explicit TileTaskManagerImpl(TaskGraphRunner* task_graph_runner); 55 TileTaskManagerImpl(
56 std::unique_ptr<RasterBufferProvider> raster_buffer_provider,
57 TaskGraphRunner* task_graph_runner);
51 58
59 std::unique_ptr<RasterBufferProvider> raster_buffer_provider_;
52 TaskGraphRunner* task_graph_runner_; 60 TaskGraphRunner* task_graph_runner_;
53 const NamespaceToken namespace_token_; 61 const NamespaceToken namespace_token_;
54 62
55 private: 63 private:
56 DISALLOW_COPY_AND_ASSIGN(TileTaskManagerImpl); 64 DISALLOW_COPY_AND_ASSIGN(TileTaskManagerImpl);
57 }; 65 };
58 66
59 } // namespace cc 67 } // namespace cc
60 68
61 #endif // CC_TILES_TILE_TASK_MANAGER_H_ 69 #endif // CC_TILES_TILE_TASK_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/tiles/tile_task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698