D29397: KPreviewJob : Support for DeviceRatioPixel

Stefan BrĂ¼ns noreply at phabricator.kde.org
Mon Sep 7 16:09:45 BST 2020


bruns added a comment.


  Most thumbnailers are completely DPR agnostic, and will create identical thumbnails for large at 1 and normal at 2. Having both is a waste of disk space and CPU time.
  
  The thumbnailer should have a key in its metadata to tell if it depends on the DPR, and only then different thumbnails should be created.

INLINE COMMENTS

> previewjob.cpp:699
>          }
> -        shmid = shmget(IPC_PRIVATE, cacheWidth * cacheHeight * 4, IPC_CREAT | 0600);
> +        shmid = shmget(IPC_PRIVATE, cacheWidth * cacheHeight * 4 * devicePixelRatio * devicePixelRatio, IPC_CREAT | 0600);
>          if (shmid != -1) {

mixing floating point and integers for a memory-allocation like function is a real bad idea.

REPOSITORY
  R241 KIO

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

To: meven, dfaure, broulik, #frameworks, ngraham
Cc: bruns, elvisangelaccio, kossebau, davidedmundson, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200907/535c1b0d/attachment.htm>


More information about the Kde-frameworks-devel mailing list