During viewport navigation the algorithm that calculates the resolution divider assumes that the at every resolution division the sample count will be 4. This is not true for cases where the resolution division is equal to 2 * pixel_size and pixel_size. In those cases the sample count is 1. As a result the algorithm assumes 2 * pixel_size and pixel_size are too expensive in a lot of cases and thus doesn't use it.
This patch addresses this issue by informing the algorithm of changes in sample counts between resolution divisions meaning it can more properly gauge the performance of various resolution divisions. As a result the algorithm is more likely to pick the correct resolution divider when performance of the scene is in the range that 2 * pixel_size and pixel_size are viable options all while keeping the performance target at 30fps like before.
Along with this patch the sample count while the resolution divider is equal to 2 * pixel_size has been increased from 1 sample per pixel to 2 samples per pixel. Without an increase to this value there are some negative side effects. I have chosen the value of 2 and not 4 because this values means at a resolution divider of 2 * pixel_size the rendering is still cheaper than a resolution divider of pixel_size.