Assorted rendering tweaks
This is a relatively boring but necessary MR consisting of all the changes I need to get out of my system before I can continue with something more interesting (multithreading).
OpenGL:
- Add
TextureCache
- shaves off a fraction of a millisecond per tile that was being wasted due to driver overhead, spotted by @martok in inbox#6363 (comment 967963363). - Use
glInvalidate
where appropriate - a micro-optimization. - Fix outline overlay opacity backwardsness - the setting was interpreted backwards due to only ever testing at 0.5...
Canvas:
- Rework block updates - give !4625 (merged) a preference, and tweak how it works to have less redraw trails and redrawing of unchanged content, as well as making it compatible with future tile parallelisation.
- Fix min bounding box screwup (my fault) - fix the algorithm to actually calculate the min bounding box, not the max. The visual effect is lower fragmenting at the edges on zooming out.
DrawingItem:
- Refactoring of Drawing and DrawingItem, preference observing for Drawing, react to preference updates correctly.
- Changes to how render flags, pick flags, antialiasing setting and outline colour are manipulated to avoid having them being constantly changed while rendering (MT roadblock).
- Eliminate too-small bboxes and missing bbox updates.
Bugs fixed:
-
Fixes #1031 (closed). Fixes an unreported bug that changing filter/blur quality doesn't update display due to not clearing cache.
-
Fixes #873 (closed). Fixes an unreported bug on 1.3 that filtered objects are clipped too much in outline overlay mode.
-
Fixes #2669 (closed).
-
Tighten mitre bboxes - reduces needless redrawing spotted by @mkov in !3838 (comment 813007325).
Edited by PBS