Parallelization

22 views
Skip to first unread message

Olivier Brault

unread,
Apr 3, 2018, 7:04:27 PM4/3/18
to marlin-renderer
Hi,

I know Marlin renderer is good when parallelized, compared to Oracle renderer.
I imagine it means we can parallelized rendering on different buffered image, like for a image server generating different images simultaneously.

But is it possible to parallelize a rendering on a same BufferedImage ? Will it work ?

Thanks in advance for your help.

Olivier

Laurent Bourgès

unread,
Apr 4, 2018, 3:34:18 AM4/4/18
to marlin-...@googlegroups.com
Olivier,

Yes you can use mutithreading on the same buffered image as sw loops (awt) lock the surface anyway (safe) so smaller gains in this case as blending will become serialized.

However you will face the painting problem: overlapping shapes will not be rendered sequentially so the order will be different and visual differences may appear.
It is better to use different layers (buf img) or divide your drawing in non-overlapping regions...

Laurent

--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.
To post to this group, send email to marlin-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Olivier Brault

unread,
Apr 4, 2018, 6:49:36 AM4/4/18
to marlin-renderer
Thank for your answer
In fact, my case is specific as I know that my drawing consists exclusively in drawing path without filling and with the same color.
In that particular case, I think that the resulting image will be the same for every drawing order of each element.

However I understand that when drawings overlap each other there is a synchronization/serialisation that kill the multithreading advantage.

When does this serialisation happen ? Each time a pixel is written ? only when the pixels overlap ?

Thanks in advance for your explanations.

Olivier
Reply all
Reply to author
Forward
0 new messages