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

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

Issue 2654643004: cc: Fix missing ready to activate/draw callbacks. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | cc/tiles/tile_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 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 195
196 void CheckIfMoreTilesNeedToBePreparedForTesting() { 196 void CheckIfMoreTilesNeedToBePreparedForTesting() {
197 CheckIfMoreTilesNeedToBePrepared(); 197 CheckIfMoreTilesNeedToBePrepared();
198 } 198 }
199 199
200 void SetMoreTilesNeedToBeRasterizedForTesting() { 200 void SetMoreTilesNeedToBeRasterizedForTesting() {
201 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; 201 all_tiles_that_need_to_be_rasterized_are_scheduled_ = false;
202 } 202 }
203 203
204 void ResetSignalsForTesting() { signals_.reset(); }
205
204 bool HasScheduledTileTasksForTesting() const { 206 bool HasScheduledTileTasksForTesting() const {
205 return has_scheduled_tile_tasks_; 207 return has_scheduled_tile_tasks_;
206 } 208 }
207 209
208 void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer, 210 void OnRasterTaskCompleted(std::unique_ptr<RasterBuffer> raster_buffer,
209 Tile* tile, 211 Tile* tile,
210 Resource* resource, 212 Resource* resource,
211 bool was_canceled); 213 bool was_canceled);
212 214
213 protected: 215 protected:
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 std::unique_ptr<EvictionTilePriorityQueue> 278 std::unique_ptr<EvictionTilePriorityQueue>
277 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( 279 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit(
278 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue, 280 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
279 const MemoryUsage& limit, 281 const MemoryUsage& limit,
280 const TilePriority& oother_priority, 282 const TilePriority& oother_priority,
281 MemoryUsage* usage); 283 MemoryUsage* usage);
282 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority); 284 bool TilePriorityViolatesMemoryPolicy(const TilePriority& priority);
283 bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const; 285 bool AreRequiredTilesReadyToDraw(RasterTilePriorityQueue::Type type) const;
284 void CheckIfMoreTilesNeedToBePrepared(); 286 void CheckIfMoreTilesNeedToBePrepared();
285 void CheckAndIssueSignals(); 287 void CheckAndIssueSignals();
286 bool MarkTilesOutOfMemory( 288 void MarkTilesOutOfMemory(
287 std::unique_ptr<RasterTilePriorityQueue> queue) const; 289 std::unique_ptr<RasterTilePriorityQueue> queue) const;
288 290
289 ResourceFormat DetermineResourceFormat(const Tile* tile) const; 291 ResourceFormat DetermineResourceFormat(const Tile* tile) const;
290 bool DetermineResourceRequiresSwizzle(const Tile* tile) const; 292 bool DetermineResourceRequiresSwizzle(const Tile* tile) const;
291 293
292 void DidFinishRunningTileTasksRequiredForActivation(); 294 void DidFinishRunningTileTasksRequiredForActivation();
293 void DidFinishRunningTileTasksRequiredForDraw(); 295 void DidFinishRunningTileTasksRequiredForDraw();
294 void DidFinishRunningAllTileTasks(); 296 void DidFinishRunningAllTileTasks();
295 297
296 scoped_refptr<TileTask> CreateTaskSetFinishedTask( 298 scoped_refptr<TileTask> CreateTaskSetFinishedTask(
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 std::vector<scoped_refptr<TileTask>> locked_image_tasks_; 351 std::vector<scoped_refptr<TileTask>> locked_image_tasks_;
350 352
351 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; 353 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_;
352 354
353 DISALLOW_COPY_AND_ASSIGN(TileManager); 355 DISALLOW_COPY_AND_ASSIGN(TileManager);
354 }; 356 };
355 357
356 } // namespace cc 358 } // namespace cc
357 359
358 #endif // CC_TILES_TILE_MANAGER_H_ 360 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698