krita 1.6 SVN branch: Problems with bumpmap and previewwidget

Schleimer, Ben bensch128 at yahoo.com
Sun Mar 4 16:36:59 CET 2007


Hi all,
  I've been trying to debug the bumpmap filter and make it work again and I started with why the
preview didn't show up in the preview dialog. After much playing with ddd, I found that in
kis_filter_manager.cc line 352, the original device is set in the preview widget -> creates a
scaled previewdevice with m_parentLayer set to NULL. (KisPreviewWidget::zoomChanged line 203) This
is a problem because bumpmap filter tries to query src's m_parentLayer for the image it belongs to
and the preview device doesn't belong to any layer. 

The obvious solution would be to set the preview's parent layer to the original's parent layer but
that won't work either because the preview is scaled down from the original's size and the filters
implicitly assume that the src and dst sizes are the same. 

The correct solution would be to have the previewwidget build a temporary image from the original,
filter that and then scale it down to the preview widgets size during each preview. I talked to
BCoppens and he indicated that this is how KisPreviewWidget used to work but was changed because
of performance problems. Is there any way to go back to the original behavior and optimize the
scaling performance?





More information about the kimageshop mailing list