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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
935 tile->id(), tile->invalidated_content_rect(), tile->invalidated_id(), | 935 tile->id(), tile->invalidated_content_rect(), tile->invalidated_id(), |
936 &invalidated_rect); | 936 &invalidated_rect); |
937 } | 937 } |
938 | 938 |
939 if (resource) { | 939 if (resource) { |
940 resource_content_id = tile->invalidated_id(); | 940 resource_content_id = tile->invalidated_id(); |
941 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); | 941 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); |
942 } else { | 942 } else { |
943 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), | 943 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), |
944 DetermineResourceFormat(tile), | 944 DetermineResourceFormat(tile), |
945 gfx::ColorSpace()); | 945 client_->GetTileColorSpace()); |
vmpstr
2016/09/14 23:00:43
Can you make CreateRasterTask take the color space
ccameron
2016/09/15 07:13:42
Done.
| |
946 } | 946 } |
947 | 947 |
948 // For LOW_RESOLUTION tiles, we don't draw or predecode images. | 948 // For LOW_RESOLUTION tiles, we don't draw or predecode images. |
949 RasterSource::PlaybackSettings playback_settings; | 949 RasterSource::PlaybackSettings playback_settings; |
950 playback_settings.skip_images = | 950 playback_settings.skip_images = |
951 prioritized_tile.priority().resolution == LOW_RESOLUTION; | 951 prioritized_tile.priority().resolution == LOW_RESOLUTION; |
952 | 952 |
953 // Create and queue all image decode tasks that this tile depends on. | 953 // Create and queue all image decode tasks that this tile depends on. |
954 TileTask::Vector decode_tasks; | 954 TileTask::Vector decode_tasks; |
955 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()]; | 955 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()]; |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1330 all_tile_tasks_completed = false; | 1330 all_tile_tasks_completed = false; |
1331 did_notify_all_tile_tasks_completed = false; | 1331 did_notify_all_tile_tasks_completed = false; |
1332 } | 1332 } |
1333 | 1333 |
1334 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; | 1334 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule() = default; |
1335 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( | 1335 TileManager::PrioritizedWorkToSchedule::PrioritizedWorkToSchedule( |
1336 PrioritizedWorkToSchedule&& other) = default; | 1336 PrioritizedWorkToSchedule&& other) = default; |
1337 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; | 1337 TileManager::PrioritizedWorkToSchedule::~PrioritizedWorkToSchedule() = default; |
1338 | 1338 |
1339 } // namespace cc | 1339 } // namespace cc |
OLD | NEW |