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

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

Issue 2726343004: cc: Optimize decode scheduling for checker-images. (Closed)
Patch Set: .. Created 3 years, 9 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 ~PrioritizedWorkToSchedule(); 275 ~PrioritizedWorkToSchedule();
276 276
277 std::vector<PrioritizedTile> tiles_to_raster; 277 std::vector<PrioritizedTile> tiles_to_raster;
278 std::vector<PrioritizedTile> tiles_to_process_for_images; 278 std::vector<PrioritizedTile> tiles_to_process_for_images;
279 }; 279 };
280 280
281 void FreeResourcesForTile(Tile* tile); 281 void FreeResourcesForTile(Tile* tile);
282 void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile); 282 void FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(Tile* tile);
283 scoped_refptr<TileTask> CreateRasterTask( 283 scoped_refptr<TileTask> CreateRasterTask(
284 const PrioritizedTile& prioritized_tile, 284 const PrioritizedTile& prioritized_tile,
285 const gfx::ColorSpace& color_space); 285 const gfx::ColorSpace& color_space,
286 CheckerImageTracker::ImageDecodeQueue* checker_image_decode_queue);
286 287
287 std::unique_ptr<EvictionTilePriorityQueue> 288 std::unique_ptr<EvictionTilePriorityQueue>
288 FreeTileResourcesUntilUsageIsWithinLimit( 289 FreeTileResourcesUntilUsageIsWithinLimit(
289 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue, 290 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
290 const MemoryUsage& limit, 291 const MemoryUsage& limit,
291 MemoryUsage* usage); 292 MemoryUsage* usage);
292 std::unique_ptr<EvictionTilePriorityQueue> 293 std::unique_ptr<EvictionTilePriorityQueue>
293 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( 294 FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit(
294 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue, 295 std::unique_ptr<EvictionTilePriorityQueue> eviction_priority_queue,
295 const MemoryUsage& limit, 296 const MemoryUsage& limit,
(...skipping 11 matching lines...) Expand all
307 308
308 void DidFinishRunningTileTasksRequiredForActivation(); 309 void DidFinishRunningTileTasksRequiredForActivation();
309 void DidFinishRunningTileTasksRequiredForDraw(); 310 void DidFinishRunningTileTasksRequiredForDraw();
310 void DidFinishRunningAllTileTasks(); 311 void DidFinishRunningAllTileTasks();
311 312
312 scoped_refptr<TileTask> CreateTaskSetFinishedTask( 313 scoped_refptr<TileTask> CreateTaskSetFinishedTask(
313 void (TileManager::*callback)()); 314 void (TileManager::*callback)());
314 PrioritizedWorkToSchedule AssignGpuMemoryToTiles(); 315 PrioritizedWorkToSchedule AssignGpuMemoryToTiles();
315 void ScheduleTasks(const PrioritizedWorkToSchedule& work_to_schedule); 316 void ScheduleTasks(const PrioritizedWorkToSchedule& work_to_schedule);
316 317
318 void FilterImagesForCheckering(
vmpstr 2017/03/29 19:11:46 This needs a comment explaining what each paramete
Khushal 2017/03/31 04:31:01 The function was killed.
319 WhichTree tree,
320 const std::vector<DrawImage>& images_in_tile,
321 std::vector<DrawImage>* images_to_decode_for_raster,
vmpstr 2017/03/29 19:11:46 just images_to_decode is enough I think.
322 ImageIdFlatSet* checkered_images,
323 CheckerImageTracker::ImageDecodeQueue* image_decode_queue);
324
317 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> 325 std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
318 ScheduledTasksStateAsValue() const; 326 ScheduledTasksStateAsValue() const;
319 327
320 bool UsePartialRaster() const; 328 bool UsePartialRaster() const;
321 329
322 void CheckPendingGpuWorkTiles(bool issue_signals); 330 void CheckPendingGpuWorkTiles(bool issue_signals);
323 331
324 TileManagerClient* client_; 332 TileManagerClient* client_;
325 base::SequencedTaskRunner* task_runner_; 333 base::SequencedTaskRunner* task_runner_;
326 ResourcePool* resource_pool_; 334 ResourcePool* resource_pool_;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; 383 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_;
376 // The |ready_to_draw_callback_weak_ptr_factory_| is never invalidated. 384 // The |ready_to_draw_callback_weak_ptr_factory_| is never invalidated.
377 base::WeakPtrFactory<TileManager> ready_to_draw_callback_weak_ptr_factory_; 385 base::WeakPtrFactory<TileManager> ready_to_draw_callback_weak_ptr_factory_;
378 386
379 DISALLOW_COPY_AND_ASSIGN(TileManager); 387 DISALLOW_COPY_AND_ASSIGN(TileManager);
380 }; 388 };
381 389
382 } // namespace cc 390 } // namespace cc
383 391
384 #endif // CC_TILES_TILE_MANAGER_H_ 392 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698