I think we still need the eventually priority, since the distance to visible is important to determine the relative raster (and eviction) order of the tiles. In cases where the viewport is static, most tiles near the viewport end up being in the eventually bin and in those cases, I think we still would prefer to raster content that is closer to the viewport first and evict content that is further from the viewport first. Note that it's not so much of an issue with one layer, since the spiral iterator determines the order of tiles (for raster, at least). However, it becomes an issue when trying to decide which layer should contribute the next tile.
Hi,The idea is more like to simplify the handling of different tile related rectangles -- not remove distante_to_visible values or such.I think we still need the eventually priority, since the distance to visible is important to determine the relative raster (and eviction) order of the tiles. In cases where the viewport is static, most tiles near the viewport end up being in the eventually bin and in those cases, I think we still would prefer to raster content that is closer to the viewport first and evict content that is further from the viewport first. Note that it's not so much of an issue with one layer, since the spiral iterator determines the order of tiles (for raster, at least). However, it becomes an issue when trying to decide which layer should contribute the next tile.
At the moment, the tiling raster tile iterator iterates first over visible tiles (these tiles have priority bin set to NOW and distance_to_visible set to 0), then over skewport tiles (these tiles have priority bin set to SEEN and distance_to_visible set to a value greater than zero), then over soon border rect tiles (these tiles have also priority bin set to SEEN and distance_to_visible set to a value greater than zero) and finally over rest of the eventually rect tiles (these tiles have priority bin set to EVENTUALLY and distance_to_visible set to a value greater than zero).
There is one problem here: if the skewport is very high, some skewport tiles have priorities which are smaller than those of soon border rect tiles even though tiling raster tile iterators yield skewport tiles (correctly) before soon border rect tiles. This may result layer raster tile iterators to prioritize tiling raster tile iterators incorrectly. That is, it might happen that if only some layers have high skewports, some of those skewport tiles are rasterized only after soon border rect tiles of other layers are rasterized even though skewport tiles are more important than soon border tiles.
The other thing is that (from the raster tile iterator point of view) soon border rect tiles (having priority bin SOON) and eventually rect tiles (having priority bin EVENTUALLY) are not that different. The only difference is that soon border rect tiles are closer to the visible rect than eventually rect tiles. But that is already handled by smaller distance_to_visible values. Therefore there is not need to iterate over soon border rect tiles and eventually rect tiles separately or for them to have different priority bins.
It would be enough to have one priority bin for visible tiles and skewport tiles (the former ones should have distance_to_visible set to 0 and the latter ones should have distance_to_visible set to a value greater than 0) and one priority bin for soon border rect tiles and eventually rect tiles (the former ones have smaller distance_to_visible values than the latter ones).
Br,
Eero