D11319: [KStandardItemListWidget] Avoid needless image resizing

Kai Uwe Broulik noreply at phabricator.kde.org
Wed Mar 14 09:37:11 GMT 2018


broulik created this revision.
broulik added reviewers: Dolphin, elvisangelaccio, davidedmundson.
broulik requested review of this revision.

REVISION SUMMARY
  There were a couple of mistakes when porting it to use `devicePixelRatio` resulting in it constantly recreating pixmaps when on a high dpi screen. There can also be rounding errors when scaling pixmaps when keeping aspect ratio, allow a 1px size difference.

TEST PLAN
  Folder thumbnails are noticeably sharper as they're no longer scaled down and back up. They are still not as crisp as everything else because KIO thumbnailer doesn't support high dpi thumbnails yet.
  
  During normal folder browsing I found that `KPixmapModifier::scale` is no longer called from `KStandardItemListWidget::drawPixmap` - I think that is also just a last resort to scale it here, the pixmap should have always been created in the correct size to begin with.

REPOSITORY
  R318 Dolphin

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

AFFECTED FILES
  src/kitemviews/kstandarditemlistwidget.cpp

To: broulik, #dolphin, elvisangelaccio, davidedmundson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180314/9134d240/attachment.htm>


More information about the kfm-devel mailing list