Hi Christoph,

That approach is generally the recommended way to paint images in SWT. Painting 
of a pre-created Image should be as fast as the OS allows.
Have you measured the times involved? Which phase do you need to speed up:

1. creating ImageData,
2. creating Image from ImageData, or
3. painting Image?

If 1, see if you can directly manipulate the ImageData’s data, or using 
setPixels.
If 2, check which image format you’re using — it may not map directly to the 
native display, and thus be expensive to convert.
If 3, I’d be surprised, but it would be good to know details and the times for 
1,2,3.

Best, Nick
On Apr 19, 2021, 5:20 AM -0400, Christoph Läubrich <lae...@laeubi-soft.de>, 
wrote:
> I have a pixel-buffer and like it o be painted in the most performant
> way onto a SWT Canvas.
>
> Current approach is to convert this into an ImageData, create an image
> and then paint it inside PaintListener to the GC.
>
> Is there a way to avoid this intermediate steps? I won't mind if I need
> to provide platform-specific implementations if it is possible to gain
> performance here.
> _______________________________________________
> platform-dev mailing list
> platform-dev@eclipse.org
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/platform-dev
_______________________________________________
platform-dev mailing list
platform-dev@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/platform-dev

Reply via email to