[vlc-devel] [PATCH 1/2] picture: always copy context when cloning
Alexandre Janniaux
ajanni at videolabs.io
Thu Apr 22 08:18:22 UTC 2021
Hi,
On Wed, Apr 21, 2021 at 06:01:22PM +0300, Rémi Denis-Courmont wrote:
> Le tiistaina 20. huhtikuuta 2021, 17.17.42 EEST Romain Vimont a écrit :
> > From: Alexandre Janniaux <ajanni at videolabs.io>
> >
> > picture_Clone was copying the original picture context into the new
> > clone while picture_pool_Clone wasn't. As it is possible to create a
> > pool from existing pictures, it's quite handy to be able to associate
> > the graphical resources needed for each picture to their context so
> > that it can be retrieved after a call to picture_pool_Wait/Get.
> >
> > The rationale is that because resources like pixels are shared between
> > the original picture and the clone, we should probably do the same with
> > picture_context and have a unified way for picture producer to
> > reference such resources.
>
> I don't remember why it's the way it is.
> Either it was simply that it was not needed. Or it was that it wouldn't work.
It might not be written clearly above, but by «the rationale»
I actually designate the rationale of the patch, not of the
previous state of the code.
I think too that it's either a refactor artifact or because
picture pools didn't need to forward context so it was less
code executed. IIRC, there might have been a third more valid
reason but I don't recall it unfortunately.
Regards,
--
Alexandre Janniaux
Videolabs
More information about the vlc-devel
mailing list