| 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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 resource_content_id = tile->invalidated_id(); | 950 resource_content_id = tile->invalidated_id(); |
| 951 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); | 951 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); |
| 952 } else { | 952 } else { |
| 953 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), | 953 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), |
| 954 DetermineResourceFormat(tile), | 954 DetermineResourceFormat(tile), |
| 955 color_space); | 955 color_space); |
| 956 } | 956 } |
| 957 | 957 |
| 958 // For LOW_RESOLUTION tiles, we don't draw or predecode images. | 958 // For LOW_RESOLUTION tiles, we don't draw or predecode images. |
| 959 RasterSource::PlaybackSettings playback_settings; | 959 RasterSource::PlaybackSettings playback_settings; |
| 960 playback_settings.target_color_space = color_space; |
| 960 playback_settings.skip_images = | 961 playback_settings.skip_images = |
| 961 prioritized_tile.priority().resolution == LOW_RESOLUTION; | 962 prioritized_tile.priority().resolution == LOW_RESOLUTION; |
| 962 | 963 |
| 963 // Create and queue all image decode tasks that this tile depends on. | 964 // Create and queue all image decode tasks that this tile depends on. |
| 964 TileTask::Vector decode_tasks; | 965 TileTask::Vector decode_tasks; |
| 965 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()]; | 966 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()]; |
| 966 ImageIdFlatSet images_to_skip; | 967 ImageIdFlatSet images_to_skip; |
| 967 images.clear(); | 968 images.clear(); |
| 968 if (!playback_settings.skip_images) { | 969 if (!playback_settings.skip_images) { |
| 969 prioritized_tile.raster_source()->GetDiscardableImagesInRect( | 970 prioritized_tile.raster_source()->GetDiscardableImagesInRect( |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1432 all_tile_tasks_completed = false; | 1433 all_tile_tasks_completed = false; |
| 1433 did_notify_all_tile_tasks_completed = false; | 1434 did_notify_all_tile_tasks_completed = false; |
| 1434 } | 1435 } |
| 1435 | 1436 |
| 1436 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; | 1437 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; |
| 1437 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( | 1438 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( |
| 1438 PrioritizedWorkToSchedule&& other) = default; | 1439 PrioritizedWorkToSchedule&& other) = default; |
| 1439 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; | 1440 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; |
| 1440 | 1441 |
| 1441 } // namespace cc | 1442 } // namespace cc |
| OLD | NEW |