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

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

Issue 1126813002: cc: Pass priority rect information from iterators to tilings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/tiling_set_raster_queue_required.h" 5 #include "cc/resources/tiling_set_raster_queue_required.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "cc/resources/picture_layer_tiling_set.h" 9 #include "cc/resources/picture_layer_tiling_set.h"
10 #include "cc/resources/tile.h" 10 #include "cc/resources/tile.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (!visible_iterator_) 101 if (!visible_iterator_)
102 return; 102 return;
103 103
104 current_tile_ = 104 current_tile_ =
105 tiling_->TileAt(visible_iterator_.index_x(), visible_iterator_.index_y()); 105 tiling_->TileAt(visible_iterator_.index_x(), visible_iterator_.index_y());
106 106
107 // If this is a valid tile, return it. Note that we have to use a tiling check 107 // If this is a valid tile, return it. Note that we have to use a tiling check
108 // for occlusion, since the tile's internal state has not yet been updated. 108 // for occlusion, since the tile's internal state has not yet been updated.
109 if (current_tile_ && current_tile_->NeedsRaster() && 109 if (current_tile_ && current_tile_->NeedsRaster() &&
110 !tiling_->IsTileOccluded(current_tile_)) { 110 !tiling_->IsTileOccluded(current_tile_)) {
111 tiling_->UpdateTilePriority(current_tile_); 111 tiling_->UpdateTilePriority(
112 current_tile_, tiling_->ComputePriorityRectForTile(current_tile_));
112 return; 113 return;
113 } 114 }
114 ++(*this); 115 ++(*this);
115 } 116 }
116 117
117 TilingSetRasterQueueRequired::TilingIterator::~TilingIterator() { 118 TilingSetRasterQueueRequired::TilingIterator::~TilingIterator() {
118 } 119 }
119 120
120 TilingSetRasterQueueRequired::TilingIterator& 121 TilingSetRasterQueueRequired::TilingIterator&
121 TilingSetRasterQueueRequired::TilingIterator:: 122 TilingSetRasterQueueRequired::TilingIterator::
(...skipping 17 matching lines...) Expand all
139 // internal state (it is, in fact, used to determine the tile's state). 140 // internal state (it is, in fact, used to determine the tile's state).
140 if (tiling_->IsTileOccluded(current_tile_)) 141 if (tiling_->IsTileOccluded(current_tile_))
141 continue; 142 continue;
142 143
143 // If we get here, that means we have a valid tile that needs raster and is 144 // If we get here, that means we have a valid tile that needs raster and is
144 // in the NOW bin, which means that it can be required. 145 // in the NOW bin, which means that it can be required.
145 break; 146 break;
146 } 147 }
147 148
148 if (current_tile_) 149 if (current_tile_)
149 tiling_->UpdateTilePriority(current_tile_); 150 tiling_->UpdateTilePriority(
151 current_tile_, tiling_->ComputePriorityRectForTile(current_tile_));
150 return *this; 152 return *this;
151 } 153 }
152 154
153 } // namespace cc 155 } // namespace cc
OLDNEW
« cc/resources/tiling_set_raster_queue_all.cc ('K') | « cc/resources/tiling_set_raster_queue_all.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698