| OLD | NEW |
| 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 #include "cc/tiles/tile_manager.h" | 5 #include "cc/tiles/tile_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 CreateTaskSetFinishedTask(&TileManager::DidFinishRunningAllTileTasks); | 849 CreateTaskSetFinishedTask(&TileManager::DidFinishRunningAllTileTasks); |
| 850 | 850 |
| 851 // Build a new task queue containing all task currently needed. Tasks | 851 // Build a new task queue containing all task currently needed. Tasks |
| 852 // are added in order of priority, highest priority task first. | 852 // are added in order of priority, highest priority task first. |
| 853 for (auto& prioritized_tile : tiles_that_need_to_be_rasterized) { | 853 for (auto& prioritized_tile : tiles_that_need_to_be_rasterized) { |
| 854 Tile* tile = prioritized_tile.tile(); | 854 Tile* tile = prioritized_tile.tile(); |
| 855 | 855 |
| 856 DCHECK(tile->draw_info().requires_resource()); | 856 DCHECK(tile->draw_info().requires_resource()); |
| 857 DCHECK(!tile->draw_info().resource()); | 857 DCHECK(!tile->draw_info().resource()); |
| 858 | 858 |
| 859 if (!tile->raster_task_) | 859 if (!tile->raster_task_) { |
| 860 tile->raster_task_ = CreateRasterTask( | 860 tile->raster_task_ = |
| 861 prioritized_tile, | 861 CreateRasterTask(prioritized_tile, target_color_space); |
| 862 prioritized_tile.raster_source()->HasImpliedColorSpace() | 862 } |
| 863 ? prioritized_tile.raster_source()->GetImpliedColorSpace() | |
| 864 : target_color_space); | |
| 865 | 863 |
| 866 TileTask* task = tile->raster_task_.get(); | 864 TileTask* task = tile->raster_task_.get(); |
| 867 | 865 |
| 868 DCHECK(!task->HasCompleted()); | 866 DCHECK(!task->HasCompleted()); |
| 869 | 867 |
| 870 if (tile->required_for_activation()) { | 868 if (tile->required_for_activation()) { |
| 871 required_for_activate_count++; | 869 required_for_activate_count++; |
| 872 graph_.edges.push_back( | 870 graph_.edges.push_back( |
| 873 TaskGraph::Edge(task, required_for_activation_done_task.get())); | 871 TaskGraph::Edge(task, required_for_activation_done_task.get())); |
| 874 } | 872 } |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 all_tile_tasks_completed = false; | 1467 all_tile_tasks_completed = false; |
| 1470 did_notify_all_tile_tasks_completed = false; | 1468 did_notify_all_tile_tasks_completed = false; |
| 1471 } | 1469 } |
| 1472 | 1470 |
| 1473 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; | 1471 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; |
| 1474 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( | 1472 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( |
| 1475 PrioritizedWorkToSchedule&& other) = default; | 1473 PrioritizedWorkToSchedule&& other) = default; |
| 1476 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; | 1474 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; |
| 1477 | 1475 |
| 1478 } // namespace cc | 1476 } // namespace cc |
| OLD | NEW |