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

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

Issue 2003353003: cc: Ensure members needed on task completion get called on valid thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_task_new_state_in_dtor
Patch Set: another approach, feedback 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_MANAGER_H_ 5 #ifndef CC_TILES_TILE_MANAGER_H_
6 #define CC_TILES_TILE_MANAGER_H_ 6 #define CC_TILES_TILE_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 void SetMoreTilesNeedToBeRasterizedForTesting() { 192 void SetMoreTilesNeedToBeRasterizedForTesting() {
193 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; 193 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false;
194 } 194 }
195 195
196 bool HasScheduledTileTasksForTesting() const { 196 bool HasScheduledTileTasksForTesting() const {
197 return has_scheduled_tile_tasks_; 197 return has_scheduled_tile_tasks_;
198 } 198 }
199 199
200 void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer, 200 static void OnRasterTaskCompleted(
201 Tile* tile, 201 std::unique_ptr<RasterBuffer> raster_buffer,
202 Resource* resource, 202 TileTask::TaskCompletionInfo* completion_info,
203 bool was_canceled); 203 bool was_canceled);
204 204
205 protected: 205 protected:
206 TileManager(TileManagerClient* client, 206 TileManager(TileManagerClient* client,
207 scoped_refptr<base::SequencedTaskRunner> task_runner, 207 scoped_refptr<base::SequencedTaskRunner> task_runner,
208 size_t scheduled_raster_task_limit, 208 size_t scheduled_raster_task_limit,
209 bool use_partial_raster); 209 bool use_partial_raster);
210 210
211 void FreeResourcesForReleasedTiles(); 211 void FreeResourcesForReleasedTiles();
212 void CleanUpReleasedTiles(); 212 void CleanUpReleasedTiles();
213 213
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_; 341 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_;
342 342
343 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; 343 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_;
344 344
345 DISALLOW_COPY_AND_ASSIGN(TileManager); 345 DISALLOW_COPY_AND_ASSIGN(TileManager);
346 }; 346 };
347 347
348 } // namespace cc 348 } // namespace cc
349 349
350 #endif // CC_TILES_TILE_MANAGER_H_ 350 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/raster/tile_task.h ('k') | cc/tiles/tile_manager.cc » ('j') | cc/tiles/tile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698