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

Unified Diff: cc/resources/tile_manager.cc

Issue 14230007: cc: Do GatherPixelRefs from skia at record time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed gather to iterators Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« cc/resources/picture.cc ('K') | « cc/resources/picture_pile_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index b93cd69710a93ffdaf5f51a93a90b75953f6fa7c..0716748bccde04fbf6ed5a75572c9588c8685a0d 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -641,10 +641,14 @@ void TileManager::GatherPixelRefsForTile(Tile* tile) {
if (managed_tile_state.need_to_gather_pixel_refs) {
base::TimeTicks start_time =
rendering_stats_instrumentation_->StartRecording();
- tile->picture_pile()->GatherPixelRefs(
- tile->content_rect_,
- tile->contents_scale_,
- managed_tile_state.pending_pixel_refs);
+ PicturePileImpl::LazyPixelRefsIterator pixel_ref_iter(
+ tile->content_rect(),
+ tile->contents_scale(),
+ tile->picture_pile());
+ while (pixel_ref_iter) {
enne (OOO) 2013/04/22 16:47:26 subjective style nit: use a for loop for iterators
+ managed_tile_state.pending_pixel_refs.push_back(*pixel_ref_iter);
+ ++pixel_ref_iter;
+ }
managed_tile_state.need_to_gather_pixel_refs = false;
base::TimeDelta duration =
rendering_stats_instrumentation_->EndRecording(start_time);
@@ -814,7 +818,6 @@ void TileManager::OnRasterTaskCompleted(
// Finish resource initialization if |can_use_gpu_memory| is true.
if (managed_tile_state.can_use_gpu_memory) {
-
// Tile resources can't be freed until upload has completed.
tile->drawing_info().can_be_freed_ = false;
« cc/resources/picture.cc ('K') | « cc/resources/picture_pile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698