Review Request 121886: Fix thumbnailing (for filemanager) by separate thumbnailer for Krita file types

Boudewijn Rempt boud at valdyas.org
Wed Jan 7 09:45:13 GMT 2015



> On Jan. 7, 2015, 9:12 a.m., Boudewijn Rempt wrote:
> > Honestly, I'd say, don't bother with trying to render a krita or ora document if there's no thumbnail or merged image to use. 
> > 
> > ORA has:
> > 
> > * Thumbnails/thumbnail.png
> > * mergedimage.png
> > 
> > KRA has:
> > * preview.png
> > * mergedimage.png
> > 
> > Actually rendering a document using krita is always going to be extremely tricky because of all the delayed action and threading involved.
> > 
> > This might mean no thumbnails for some very odd .kra or .ora files, but it's preferable to linking in all of Krita.
> 
> Boudewijn Rempt wrote:
>     Oh, there's another reason for not loading all of Krita in the thumbnailer -- it would mean that any application that opens a file dialog will load all of krita. All the resources will be loaded as well -- it's the reason the kimgio plugin relies exlcusively on the mergedimage.png now.
> 
> Friedrich W. H. Kossebau wrote:
>     (thumbnailer is only loaded into the kio-thumbnail process, so not really affecting the application itself, besides eating systemmemory for some time until the kio-thumbnail process is time-outed shutdown)
>     
>     Okay, as you recommend. What is the content of the mergedimage.png, is it a full rendering of the image at full size? So should and could be used in a scaled version if the embedded thumbnail is too small? Would update the PR to that tonight then.

Yes, it's the full rendered image. It's what the kimgio plugin uses to show the image in e.g. gwenview.


- Boudewijn


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121886/#review73335
-----------------------------------------------------------


On Jan. 6, 2015, 9:25 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121886/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2015, 9:25 p.m.)
> 
> 
> Review request for Calligra and Boudewijn Rempt.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> The central Calligra thumbnailing plugin for filemanagers assumes document classes to be based on KoDocument & KoPart. Which no longer holds true for Krita after MVC got merged, KisDocument has nothing to do with that.
> 
> So a separate thumbnailer with KisDocument specific code is needed. And here I propose a first version. It should make thumbnailing for ORA, KRA and KRAANIM files work again.
> 
> Despite being a plugin (for the KDE filemanager thumbnailing system) I did not put the thumbnailer into `krita/plugins`, but instead added a subdir `krita/integration`, given this is not a plugin _for_ Krita, but _from_ Krita for other systems. I would also propose to move `krita/plugins/kimgio` to that new subdir, for consistency.
> 
> TODO:
> when behind the scenes the thumbnailing plugin is shutdown due to being unused, it crashes e.g. like this
> ```
> CRITICAL: According to statistics of the KisTileDataStore some tiles have leaked from the Krita control! 
> CRITICAL: Tiles in memory: 20034 Total tiles: 20034 
> kio_thumbnail(10513)/krita (registry) KisPaintOpRegistry::~KisPaintOpRegistry: Deleting KisPaintOpRegistry
> kio_thumbnail(10513)/krita (registry) KisBrushServer::~KisBrushServer: deleting KisBrushServer
> Fatal Error: Accessed global static 'KisMemoryLeakTracker *s_instance()' after destruction. Defined at /home/koder/Kode/kdegit/Calligra/calligra/krita/image/kis_memory_leak_tracker.cpp:45
> kioslave: ####### CRASH ###### protocol = thumbnail pid = 10513 signal = 6
> ```
> Not perfect (though not preventing any thumbnailing), any idea what might setup/shutdown be missing for the thumbnailer?
> 
> 
> Diffs
> -----
> 
>   extras/thumbnail/CMakeLists.txt 6c29b50 
>   extras/thumbnail/krita_kra_thumbnail.desktop d44255a 
>   extras/thumbnail/kritaanimation_kranim_thumbnail.desktop cd569b3 
>   krita/CMakeLists.txt 55ecc80 
>   krita/integration/CMakeLists.txt PRE-CREATION 
>   krita/integration/thumbnail/CMakeLists.txt PRE-CREATION 
>   krita/integration/thumbnail/krita_kra_thumbnail.desktop PRE-CREATION 
>   krita/integration/thumbnail/kritaanimation_kranim_thumbnail.desktop PRE-CREATION 
>   krita/integration/thumbnail/kritacreator.h PRE-CREATION 
>   krita/integration/thumbnail/kritacreator.cpp PRE-CREATION 
>   krita/plugins/formats/ora/krita_ora_thumbnail.desktop a7b0f60 
> 
> Diff: https://git.reviewboard.kde.org/r/121886/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150107/e5477e01/attachment.htm>


More information about the calligra-devel mailing list