OpenTTD/src/core
Patric Stout 8e0d48a0f6
Fix: [SDL2] simplify what to redraw to prevent tearing (#8685)
When there are a lot of rects to redraw, of which one of the last
ones is almost the full screen, visual tearing happens over the
vertical axis. This is most visible when scrolling the map.

This can be prevented by using less rects. To simplify the situation,
and as solutions like OpenGL need this anyway, keep a single rect
that shows the biggest size that updates everything correctly.

Although this means it needs a bit more time redrawing where it
is strictly seen not needed, it also means less commands have
to be executed in the backend. In the end, this is a trade-off,
and from experiments it seems the approach of this commit gives
a better result.
2021-02-17 21:19:32 +01:00
..
alloc_func.cpp
alloc_func.hpp
alloc_type.hpp
backup_type.hpp
bitmath_func.cpp
bitmath_func.hpp
CMakeLists.txt
endian_func.hpp
endian_type.hpp
enum_type.hpp
geometry_func.cpp Fix: [SDL2] simplify what to redraw to prevent tearing (#8685) 2021-02-17 21:19:32 +01:00
geometry_func.hpp Fix: [SDL2] simplify what to redraw to prevent tearing (#8685) 2021-02-17 21:19:32 +01:00
geometry_type.hpp
kdtree.hpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
math_func.cpp
math_func.hpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
mem_func.hpp
multimap.hpp
overflowsafe_type.hpp
pool_func.cpp
pool_func.hpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
pool_type.hpp
random_func.cpp
random_func.hpp
smallmap_type.hpp
smallmatrix_type.hpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
smallstack_type.hpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
smallvec_type.hpp Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
string_compare_type.hpp