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

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

Issue 470753002: cc: Change Tile::tile_size_ from a Rect to a Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/tile.cc ('k') | no next file » | 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/resources/tile_manager.h" 5 #include "cc/resources/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 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 base::Bind(&TileManager::OnImageDecodeTaskCompleted, 1019 base::Bind(&TileManager::OnImageDecodeTaskCompleted,
1020 base::Unretained(this), 1020 base::Unretained(this),
1021 tile->layer_id(), 1021 tile->layer_id(),
1022 base::Unretained(pixel_ref)))); 1022 base::Unretained(pixel_ref))));
1023 } 1023 }
1024 1024
1025 scoped_refptr<RasterTask> TileManager::CreateRasterTask(Tile* tile) { 1025 scoped_refptr<RasterTask> TileManager::CreateRasterTask(Tile* tile) {
1026 ManagedTileState& mts = tile->managed_state(); 1026 ManagedTileState& mts = tile->managed_state();
1027 1027
1028 scoped_ptr<ScopedResource> resource = 1028 scoped_ptr<ScopedResource> resource =
1029 resource_pool_->AcquireResource(tile->tile_size_.size()); 1029 resource_pool_->AcquireResource(tile->size());
1030 const ScopedResource* const_resource = resource.get(); 1030 const ScopedResource* const_resource = resource.get();
1031 1031
1032 // Create and queue all image decode tasks that this tile depends on. 1032 // Create and queue all image decode tasks that this tile depends on.
1033 ImageDecodeTask::Vector decode_tasks; 1033 ImageDecodeTask::Vector decode_tasks;
1034 PixelRefTaskMap& existing_pixel_refs = image_decode_tasks_[tile->layer_id()]; 1034 PixelRefTaskMap& existing_pixel_refs = image_decode_tasks_[tile->layer_id()];
1035 for (PicturePileImpl::PixelRefIterator iter( 1035 for (PicturePileImpl::PixelRefIterator iter(
1036 tile->content_rect(), tile->contents_scale(), tile->picture_pile()); 1036 tile->content_rect(), tile->contents_scale(), tile->picture_pile());
1037 iter; 1037 iter;
1038 ++iter) { 1038 ++iter) {
1039 SkPixelRef* pixel_ref = *iter; 1039 SkPixelRef* pixel_ref = *iter;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate"); 1181 TRACE_EVENT0("cc", "TileManager::CheckIfReadyToActivate");
1182 1182
1183 rasterizer_->CheckForCompletedTasks(); 1183 rasterizer_->CheckForCompletedTasks();
1184 did_check_for_completed_tasks_since_last_schedule_tasks_ = true; 1184 did_check_for_completed_tasks_since_last_schedule_tasks_ = true;
1185 1185
1186 if (IsReadyToActivate()) 1186 if (IsReadyToActivate())
1187 client_->NotifyReadyToActivate(); 1187 client_->NotifyReadyToActivate();
1188 } 1188 }
1189 1189
1190 } // namespace cc 1190 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698