#
0c973c94 |
|
26-Aug-2022 |
Augustin Cavalier <waddlesplash@gmail.com> |
Tracker: Refactor IconCache size handling and usages. * Instead of taking an icon_size, which we were having to cast random integers to anyway, just take a BSize and convert internally as needed. This simplifies a lot of usages of IconCache methods. * Compute what B_MINI_ICON size will be at startup. This way, we do not wind up caching "mini" icons in the fLarge*Icon variables under HiDPI. This does have a downside that if anything actually does try to fetch "true mini" (16x16) icons when the real ComposeIconSize(B_MINI_ICON) is larger than that, it will wind up (confusingly) in fLarge*Icon, but that should not cause problems and after this commit should not happen at all, anyway. * Make mini-icon-mode use ComposeSize instead of the hardcoded 16x16, and adjust metrics computations around it. * Fetch larger icons in MountMenu logic. Also use BString::SetToFormat. * Remove an unused, deprecated method from BPoseView. * Rename variables in thumbnail generation code to match new behavior.
|
#
a64cdd1d |
|
26-Apr-2022 |
Augustin Cavalier <waddlesplash@gmail.com> |
Tracker: Overhaul thumbnail generation logic. * Use a JobQueue and BJobs to generate the thumbnails, instead of spawning a potentially unlimited number of threads (which can of course rapidly exhaust resources.) Use two threads: one for smaller files, and another for larger files. * Directly insert the new thumbnails into the icon cache once they have been generated, avoiding the port-search dance on filesystems that do not support writing attributes (or at least large ones.) * Skip calling mimeset, is it not needed after the previous commit. * Combine all the duplicated image-scaling logic into one function. May help with or fix #17225, #17619, and other thumbnail-related matters e.g. #17557. Also addresses comments from the mailing list last summer.
|