Discussion:
D15402: [Thumbnails] Paint larger "one thumbnail" tile only when needed
Kai Uwe Broulik
2018-09-10 11:41:43 UTC
Permalink
broulik created this revision.
broulik added reviewers: Dolphin, ngraham.
broulik requested review of this revision.

REVISION SUMMARY
When there is only one thumbnail it is painted larger. This pixmap is always generated, even if we ended up creating more than one thumbnail.
This patch makes it remember the first valid thumbnail and paints the larger pixmap only as needed.

TEST PLAN
Thumbnails of folders with no, one, or multiple previews are still rendered correctly.
Saves up to 1 second generating the thumbnails here, however, I didn't really notice a huge impact in real world testing

REPOSITORY
R320 KIO Extras

REVISION DETAIL
https://phabricator.kde.org/D15402

AFFECTED FILES
thumbnail/thumbnail.cpp

To: broulik, #dolphin, ngraham
Kai Uwe Broulik
2018-09-11 09:44:45 UTC
Permalink
broulik updated this revision to Diff 41381.
broulik added a comment.


- Create `QImage` and `QPainter` also on-demand

REPOSITORY
R320 KIO Extras

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D15402?vs=41336&id=41381

REVISION DETAIL
https://phabricator.kde.org/D15402

AFFECTED FILES
thumbnail/thumbnail.cpp

To: broulik, #dolphin, ngraham
Kai Uwe Broulik
2018-09-11 10:00:13 UTC
Permalink
broulik updated this revision to Diff 41382.
broulik added a comment.


- Use already existing `hadFirstThumbnail` variable

REPOSITORY
R320 KIO Extras

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D15402?vs=41381&id=41382

REVISION DETAIL
https://phabricator.kde.org/D15402

AFFECTED FILES
thumbnail/thumbnail.cpp

To: broulik, #dolphin, ngraham
Kai Uwe Broulik
2018-09-25 08:38:08 UTC
Permalink
broulik added a comment.
Herald added projects: Dolphin, Frameworks.
Herald added subscribers: kfm-devel, kde-frameworks-devel.


Ping

REPOSITORY
R320 KIO Extras

REVISION DETAIL
https://phabricator.kde.org/D15402

To: broulik, #dolphin, ngraham
Cc: kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
Anthony Fieroni
2018-09-25 08:44:05 UTC
Permalink
anthonyfieroni added a comment.


Looks good +1

REPOSITORY
R320 KIO Extras

REVISION DETAIL
https://phabricator.kde.org/D15402

To: broulik, #dolphin, ngraham
Cc: anthonyfieroni, kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
Nathaniel Graham
2018-09-25 16:10:01 UTC
Permalink
ngraham accepted this revision.
ngraham added a comment.
This revision is now accepted and ready to land.


Seems fine to me. Code looks sane and behavior appears to be unchanged. Maybe faster, but that might just be confirmation bias talking. :)

REPOSITORY
R320 KIO Extras

REVISION DETAIL
https://phabricator.kde.org/D15402

To: broulik, #dolphin, ngraham
Cc: anthonyfieroni, kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
Kai Uwe Broulik
2018-10-08 14:24:22 UTC
Permalink
This revision was automatically updated to reflect the committed changes.
Closed by commit R320:44f2852fb299: [Thumbnails] Paint larger "one thumbnail" tile only when needed (authored by broulik).

REPOSITORY
R320 KIO Extras

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D15402?vs=41382&id=43132

REVISION DETAIL
https://phabricator.kde.org/D15402

AFFECTED FILES
thumbnail/thumbnail.cpp

To: broulik, #dolphin, ngraham
Cc: anthonyfieroni, kde-frameworks-devel, kfm-devel, feverfew, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp
Loading...