History log of /haiku/src/kits/tracker/Thumbnails.cpp
Revision Date Author Comments
# f7fb846f 30-Nov-2023 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Store the correct time value in the thumbnail creation attribute.

We were storing real_time_clock_usecs() but comparing against
BStatable::GetModificationTime() which is just a time_t. The
values were thus displayed wrongly in the "Get Info" window,
but also thumbnails would not have been updated when the file was.

Should fix #18691 and possibly some other tickets.


# d3811d00 08-Dec-2022 Humdinger <humdingerb@gmail.com>

Thumbnail: fix off-by-one of Height/Width attribute

Fixes #18128

Change-Id: I3abe72552657517acece101a1653b2f013b4f23f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5881
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 4fad6eb3 30-Oct-2022 PulkoMandy <pulkomandy@pulkomandy.tk>

Tracker: fix thumbnail caching

system_time returns the number of microseconds since booting. This is
not what's needed for the thumbnail generation timestamp attribute, as a
result the attribute was always considered out of date and the stored
attribute would never be used.

Change-Id: I3728077c484f341b765700532d3f986e64f165ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5767
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>


# 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.


# 7e677cae 18-Jul-2022 John Scipione <jscipione@gmail.com>

Tracker: Use NodeRef in update thumb message

... now that Add/FindNodeRef have been added.

Tested by generating thumbnails on read-only BFS file system.

Change-Id: I94d85f4edfb6f26fc88dcb7b85d9d36629062f6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5485
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 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.


# 5192c3bf 25-Apr-2022 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Move thumbnail-manipulation code to its own file.

Preparatory work for refactoring thumbnail generation to not use
so many resources (threads, ports, etc.)