Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Side by Side Diff: cc/tiles/tile_manager.cc

Issue 1713503002: Reland Allow one-copy and zero-copy task tile worker pools to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/layer_tree_pixel_resource_test.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_resource_test.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698