Chromium Code Reviews| 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(), | 674 if (!IsResourceFormatCompressed(resource->format())) { |
|
reveman
2015/12/02 18:27:18
nit: is this conditional still needed? In that cas
christiank
2015/12/03 12:57:59
No longer need, removed.
| |
| 675 resource->size().ToString()); | 675 DCHECK_EQ(tile->desired_texture_size().ToString(), |
| 676 resource->size().ToString()); | |
| 677 } | |
| 676 } else { | 678 } else { |
| 677 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), | 679 resource = resource_pool_->AcquireResource(tile->desired_texture_size(), |
| 678 DetermineResourceFormat(tile)); | 680 DetermineResourceFormat(tile)); |
| 679 } | 681 } |
| 680 | 682 |
| 681 // Create and queue all image decode tasks that this tile depends on. | 683 // Create and queue all image decode tasks that this tile depends on. |
| 682 ImageDecodeTask::Vector decode_tasks; | 684 ImageDecodeTask::Vector decode_tasks; |
| 683 std::vector<DrawImage> images; | 685 std::vector<DrawImage> images; |
| 684 prioritized_tile.raster_source()->GetDiscardableImagesInRect( | 686 prioritized_tile.raster_source()->GetDiscardableImagesInRect( |
| 685 tile->enclosing_layer_rect(), tile->contents_scale(), &images); | 687 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() { | 1019 void TileManager::Signals::reset() { |
| 1018 ready_to_activate = false; | 1020 ready_to_activate = false; |
| 1019 did_notify_ready_to_activate = false; | 1021 did_notify_ready_to_activate = false; |
| 1020 ready_to_draw = false; | 1022 ready_to_draw = false; |
| 1021 did_notify_ready_to_draw = false; | 1023 did_notify_ready_to_draw = false; |
| 1022 all_tile_tasks_completed = false; | 1024 all_tile_tasks_completed = false; |
| 1023 did_notify_all_tile_tasks_completed = false; | 1025 did_notify_all_tile_tasks_completed = false; |
| 1024 } | 1026 } |
| 1025 | 1027 |
| 1026 } // namespace cc | 1028 } // namespace cc |
| OLD | NEW |