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

Unified Diff: cc/resources/picture_layer_tiling.h

Issue 413053004: cc: Fix tiling raster iterator to process all tiles correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 5 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
« no previous file with comments | « no previous file | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.h
diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h
index 37eea09cd95c506e6cce1fb95fd2cea229814c99..5508a13928c38d42f321e97112316c05a353a9b5 100644
--- a/cc/resources/picture_layer_tiling.h
+++ b/cc/resources/picture_layer_tiling.h
@@ -57,13 +57,25 @@ class CC_EXPORT PictureLayerTiling {
operator bool() const { return !!current_tile_; }
const Tile* operator*() const { return current_tile_; }
Tile* operator*() { return current_tile_; }
- TilePriority::PriorityBin get_type() const { return type_; }
+ TilePriority::PriorityBin get_type() const {
+ switch (phase_) {
+ case VISIBLE_RECT:
+ return TilePriority::NOW;
+ case SKEWPORT_RECT:
+ case SOON_BORDER_RECT:
+ return TilePriority::SOON;
+ case EVENTUALLY_RECT:
+ return TilePriority::EVENTUALLY;
+ }
+ NOTREACHED();
+ return TilePriority::EVENTUALLY;
+ }
TilingRasterTileIterator& operator++();
gfx::Rect TileBounds() const {
DCHECK(*this);
- if (type_ == TilePriority::NOW) {
+ if (phase_ == VISIBLE_RECT) {
return tiling_->tiling_data_.TileBounds(visible_iterator_.index_x(),
visible_iterator_.index_y());
}
@@ -72,6 +84,13 @@ class CC_EXPORT PictureLayerTiling {
}
private:
+ enum Phase {
+ VISIBLE_RECT,
+ SKEWPORT_RECT,
+ SOON_BORDER_RECT,
+ EVENTUALLY_RECT
+ };
+
void AdvancePhase();
bool TileNeedsRaster(Tile* tile) const {
RasterMode mode = tile->DetermineRasterModeForTree(tree_);
@@ -80,7 +99,7 @@ class CC_EXPORT PictureLayerTiling {
PictureLayerTiling* tiling_;
- TilePriority::PriorityBin type_;
+ Phase phase_;
gfx::Rect visible_rect_in_content_space_;
gfx::Rect skewport_in_content_space_;
gfx::Rect eventually_rect_in_content_space_;
@@ -90,7 +109,6 @@ class CC_EXPORT PictureLayerTiling {
Tile* current_tile_;
TilingData::Iterator visible_iterator_;
TilingData::SpiralDifferenceIterator spiral_iterator_;
- bool skewport_processed_;
};
class CC_EXPORT TilingEvictionTileIterator {
« no previous file with comments | « no previous file | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698