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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 Resource* resource = nullptr; | 826 Resource* resource = nullptr; |
827 if (use_partial_raster_ && tile->invalidated_id()) { | 827 if (use_partial_raster_ && tile->invalidated_id()) { |
828 // TODO(danakj): For resources that are in use, we should still grab them | 828 // TODO(danakj): For resources that are in use, we should still grab them |
829 // and copy from them instead of rastering everything. crbug.com/492754 | 829 // and copy from them instead of rastering everything. crbug.com/492754 |
830 resource = | 830 resource = |
831 resource_pool_->TryAcquireResourceWithContentId(tile->invalidated_id()); | 831 resource_pool_->TryAcquireResourceWithContentId(tile->invalidated_id()); |
832 } | 832 } |
833 if (resource) { | 833 if (resource) { |
834 resource_content_id = tile->invalidated_id(); | 834 resource_content_id = tile->invalidated_id(); |
835 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); | 835 DCHECK_EQ(DetermineResourceFormat(tile), resource->format()); |
836 DCHECK_EQ(tile->desired_texture_size().ToString(), | |
837 resource->size().ToString()); | |
838 } else { | 836 } else { |
839 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), | 837 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), |
840 DetermineResourceFormat(tile)); | 838 DetermineResourceFormat(tile)); |
841 } | 839 } |
842 | 840 |
843 // Create and queue all image decode tasks that this tile depends on. | 841 // Create and queue all image decode tasks that this tile depends on. |
844 ImageDecodeTask::Vector decode_tasks; | 842 ImageDecodeTask::Vector decode_tasks; |
845 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()]; | 843 std::vector<DrawImage>& images = scheduled_draw_images_[tile->id()]; |
846 images.clear(); | 844 images.clear(); |
847 prioritized_tile.raster_source()->GetDiscardableImagesInRect( | 845 prioritized_tile.raster_source()->GetDiscardableImagesInRect( |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 void TileManager::Signals::reset() { | 1197 void TileManager::Signals::reset() { |
1200 ready_to_activate = false; | 1198 ready_to_activate = false; |
1201 did_notify_ready_to_activate = false; | 1199 did_notify_ready_to_activate = false; |
1202 ready_to_draw = false; | 1200 ready_to_draw = false; |
1203 did_notify_ready_to_draw = false; | 1201 did_notify_ready_to_draw = false; |
1204 all_tile_tasks_completed = false; | 1202 all_tile_tasks_completed = false; |
1205 did_notify_all_tile_tasks_completed = false; | 1203 did_notify_all_tile_tasks_completed = false; |
1206 } | 1204 } |
1207 | 1205 |
1208 } // namespace cc | 1206 } // namespace cc |
OLD | NEW |