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

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 18 matching lines...) Expand all
314 PrioritizedWorkToSchedule AssignGpuMemoryToTiles(); 315 PrioritizedWorkToSchedule AssignGpuMemoryToTiles();
315 void ScheduleTasks(const PrioritizedWorkToSchedule& work_to_schedule); 316 void ScheduleTasks(const PrioritizedWorkToSchedule& work_to_schedule);
316 317
317 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> 318 std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
318 ScheduledTasksStateAsValue() const; 319 ScheduledTasksStateAsValue() const;
319 320
320 bool UsePartialRaster() const; 321 bool UsePartialRaster() const;
321 322
322 void CheckPendingGpuWorkTiles(bool issue_signals); 323 void CheckPendingGpuWorkTiles(bool issue_signals);
323 324
325 void FilterImagesForCheckering(
vmpstr 2017/03/17 18:32:13 Can you add tests for this function?
326 const PrioritizedTile& prioritized_tile,
327 std::vector<DrawImage>* images_to_decode,
328 ImageIdFlatSet* checker_images,
329 CheckerImageTracker::ImageDecodeQueue* checker_image_decode_queue);
330
324 TileManagerClient* client_; 331 TileManagerClient* client_;
325 base::SequencedTaskRunner* task_runner_; 332 base::SequencedTaskRunner* task_runner_;
326 ResourcePool* resource_pool_; 333 ResourcePool* resource_pool_;
327 std::unique_ptr<TileTaskManager> tile_task_manager_; 334 std::unique_ptr<TileTaskManager> tile_task_manager_;
328 RasterBufferProvider* raster_buffer_provider_; 335 RasterBufferProvider* raster_buffer_provider_;
329 GlobalStateThatImpactsTilePriority global_state_; 336 GlobalStateThatImpactsTilePriority global_state_;
330 size_t scheduled_raster_task_limit_; 337 size_t scheduled_raster_task_limit_;
331 338
332 const TileManagerSettings tile_manager_settings_; 339 const TileManagerSettings tile_manager_settings_;
333 bool use_gpu_rasterization_; 340 bool use_gpu_rasterization_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; 382 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_;
376 // The |ready_to_draw_callback_weak_ptr_factory_| is never invalidated. 383 // The |ready_to_draw_callback_weak_ptr_factory_| is never invalidated.
377 base::WeakPtrFactory<TileManager> ready_to_draw_callback_weak_ptr_factory_; 384 base::WeakPtrFactory<TileManager> ready_to_draw_callback_weak_ptr_factory_;
378 385
379 DISALLOW_COPY_AND_ASSIGN(TileManager); 386 DISALLOW_COPY_AND_ASSIGN(TileManager);
380 }; 387 };
381 388
382 } // namespace cc 389 } // namespace cc
383 390
384 #endif // CC_TILES_TILE_MANAGER_H_ 391 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698