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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 Resource* resource = nullptr; | 664 Resource* resource = nullptr; |
665 if (use_partial_raster_ && tile->invalidated_id()) { | 665 if (use_partial_raster_ && tile->invalidated_id()) { |
666 // TODO(danakj): For resources that are in use, we should still grab them | 666 // TODO(danakj): For resources that are in use, we should still grab them |
667 // and copy from them instead of rastering everything. crbug.com/492754 | 667 // and copy from them instead of rastering everything. crbug.com/492754 |
668 resource = | 668 resource = |
669 resource_pool_->TryAcquireResourceWithContentId(tile->invalidated_id()); | 669 resource_pool_->TryAcquireResourceWithContentId(tile->invalidated_id()); |
670 } | 670 } |
671 if (resource) { | 671 if (resource) { |
672 resource_content_id = tile->invalidated_id(); | 672 resource_content_id = tile->invalidated_id(); |
673 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); | 673 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); |
674 DCHECK_EQ(tile->desired_texture_size().ToString(), | |
675 resource->size().ToString()); | |
676 } else { | 674 } else { |
677 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), | 675 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), |
678 DetermineResourceFormat(tile)); | 676 DetermineResourceFormat(tile)); |
679 } | 677 } |
680 | 678 |
681 // Create and queue all image decode tasks that this tile depends on. | 679 // Create and queue all image decode tasks that this tile depends on. |
682 ImageDecodeTask::Vector decode_tasks; | 680 ImageDecodeTask::Vector decode_tasks; |
683 std::vector<DrawImage> images; | 681 std::vector<DrawImage> images; |
684 prioritized_tile.raster_source()->GetDiscardableImagesInRect( | 682 prioritized_tile.raster_source()->GetDiscardableImagesInRect( |
685 tile->enclosing_layer_rect(), tile->contents_scale(), &images); | 683 tile->enclosing_layer_rect(), tile->contents_scale(), &images); |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 void TileManager::Signals::reset() { | 1015 void TileManager::Signals::reset() { |
1018 ready_to_activate = false; | 1016 ready_to_activate = false; |
1019 did_notify_ready_to_activate = false; | 1017 did_notify_ready_to_activate = false; |
1020 ready_to_draw = false; | 1018 ready_to_draw = false; |
1021 did_notify_ready_to_draw = false; | 1019 did_notify_ready_to_draw = false; |
1022 all_tile_tasks_completed = false; | 1020 all_tile_tasks_completed = false; |
1023 did_notify_all_tile_tasks_completed = false; | 1021 did_notify_all_tile_tasks_completed = false; |
1024 } | 1022 } |
1025 | 1023 |
1026 } // namespace cc | 1024 } // namespace cc |
OLD | NEW |