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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 resource = resource_pool_->TryAcquireResourceForPartialRaster( | 938 resource = resource_pool_->TryAcquireResourceForPartialRaster( |
939 tile->id(), tile->invalidated_content_rect(), tile->invalidated_id(), | 939 tile->id(), tile->invalidated_content_rect(), tile->invalidated_id(), |
940 &invalidated_rect); | 940 &invalidated_rect); |
941 } | 941 } |
942 | 942 |
943 if (resource) { | 943 if (resource) { |
944 resource_content_id = tile->invalidated_id(); | 944 resource_content_id = tile->invalidated_id(); |
945 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); | 945 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); |
946 } else { | 946 } else { |
947 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), | 947 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), |
948 DetermineResourceFormat(tile)); | 948 DetermineResourceFormat(tile), |
| 949 gfx::ColorSpace()); |
949 } | 950 } |
950 | 951 |
951 // For LOW_RESOLUTION tiles, we don't draw or predecode images. | 952 // For LOW_RESOLUTION tiles, we don't draw or predecode images. |
952 RasterSource::PlaybackSettings playback_settings; | 953 RasterSource::PlaybackSettings playback_settings; |
953 playback_settings.skip_images = | 954 playback_settings.skip_images = |
954 prioritized_tile.priority().resolution == LOW_RESOLUTION; | 955 prioritized_tile.priority().resolution == LOW_RESOLUTION; |
955 | 956 |
956 // Create and queue all image decode tasks that this tile depends on. | 957 // Create and queue all image decode tasks that this tile depends on. |
957 TileTask::Vector decode_tasks; | 958 TileTask::Vector decode_tasks; |
958 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()]; | 959 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()]; |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 all_tile_tasks_completed = false; | 1334 all_tile_tasks_completed = false; |
1334 did_notify_all_tile_tasks_completed = false; | 1335 did_notify_all_tile_tasks_completed = false; |
1335 } | 1336 } |
1336 | 1337 |
1337 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; | 1338 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; |
1338 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( | 1339 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( |
1339 PrioritizedWorkToSchedule&& other) = default; | 1340 PrioritizedWorkToSchedule&& other) = default; |
1340 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; | 1341 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; |
1341 | 1342 |
1342 } // namespace cc | 1343 } // namespace cc |
OLD | NEW |