| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 Resource* resource = nullptr; | 789 Resource* resource = nullptr; |
| 790 if (use_partial_raster_ && tile->invalidated_id()) { | 790 if (use_partial_raster_ && tile->invalidated_id()) { |
| 791 // TODO(danakj): For resources that are in use, we should still grab them | 791 // TODO(danakj): For resources that are in use, we should still grab them |
| 792 // and copy from them instead of rastering everything. crbug.com/492754 | 792 // and copy from them instead of rastering everything. crbug.com/492754 |
| 793 resource = | 793 resource = |
| 794 resource_pool_->TryAcquireResourceWithContentId(tile->invalidated_id()); | 794 resource_pool_->TryAcquireResourceWithContentId(tile->invalidated_id()); |
| 795 } | 795 } |
| 796 if (resource) { | 796 if (resource) { |
| 797 resource_content_id = tile->invalidated_id(); | 797 resource_content_id = tile->invalidated_id(); |
| 798 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); | 798 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); |
| 799 DCHECK_EQ(tile->desired_texture_size().ToString(), | |
| 800 resource->size().ToString()); | |
| 801 } else { | 799 } else { |
| 802 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), | 800 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), |
| 803 DetermineResourceFormat(tile)); | 801 DetermineResourceFormat(tile)); |
| 804 } | 802 } |
| 805 | 803 |
| 806 // Create and queue all image decode tasks that this tile depends on. | 804 // Create and queue all image decode tasks that this tile depends on. |
| 807 ImageDecodeTask::Vector decode_tasks; | 805 ImageDecodeTask::Vector decode_tasks; |
| 808 std::vector<DrawImage> images; | 806 std::vector<DrawImage> images; |
| 809 prioritized_tile.raster_source()->GetDiscardableImagesInRect( | 807 prioritized_tile.raster_source()->GetDiscardableImagesInRect( |
| 810 tile->enclosing_layer_rect(), tile->contents_scale(), &images); | 808 tile->enclosing_layer_rect(), tile->contents_scale(), &images); |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 void TileManager::Signals::reset() { | 1162 void TileManager::Signals::reset() { |
| 1165 ready_to_activate = false; | 1163 ready_to_activate = false; |
| 1166 did_notify_ready_to_activate = false; | 1164 did_notify_ready_to_activate = false; |
| 1167 ready_to_draw = false; | 1165 ready_to_draw = false; |
| 1168 did_notify_ready_to_draw = false; | 1166 did_notify_ready_to_draw = false; |
| 1169 all_tile_tasks_completed = false; | 1167 all_tile_tasks_completed = false; |
| 1170 did_notify_all_tile_tasks_completed = false; | 1168 did_notify_all_tile_tasks_completed = false; |
| 1171 } | 1169 } |
| 1172 | 1170 |
| 1173 } // namespace cc | 1171 } // namespace cc |
| OLD | NEW |