[poppler] [patch] using external data in SplashBitmap

Albert Astals Cid aacid at kde.org
Mon Oct 25 08:30:01 PDT 2010


A Dilluns, 25 d'octubre de 2010, vàreu escriure:
> On Mon, 25 Oct 2010, Albert Astals Cid wrote:
> > A Dilluns, 25 d'octubre de 2010, vàreu escriure:
> >> On Mon, 25 Oct 2010, Albert Astals Cid wrote:
> >>> A Dilluns, 25 d'octubre de 2010, Vincent Torri va escriure:
> >>>> On Mon, 25 Oct 2010, Albert Astals Cid wrote:
> >>>>> A Dilluns, 25 d'octubre de 2010, Vincent Torri va escriure:
> >>>>>> Hey,
> >>>>> 
> >>>>> Hi
> >>>>> 
> >>>>>> I have written a small patch for setting external data to the
> >>>>>> SplashBitmap class.
> >>>>> 
> >>>>> What's the use case for this?
> >>>> 
> >>>> I have a lib that uses objects to display a BGRA data. Those objects
> >>>> own that data. Currently, i get the pppler data, my object data, i do
> >>>> a memcpy and set my data. With the patch, no need for the memcpy : i
> >>>> pass my data to the splash bitmap and poppler fill it with the pdf
> >>>> page content. At least, it's what i understood from the code. I hope
> >>>> I'm not wrong.
> >>> 
> >>> I'm totally lost here, you mean you want to use your data as
> >>> "background" for poppler to draw over it?
> >> 
> >> yes.
> >> 
> >>>>>>   * what about alpha ? Afaics, it's just allocated memory with
> >>>>>>   
> >>>>>>     a getter, that's all.
> >>>>> 
> >>>>> Well, it holds the alpha information, i understand you probably want
> >>>>> to set it too.
> >>>> 
> >>>> ok. Not sure what to do if my external data already holds alpha
> >>>> channel, like in BGRA, ARGB etc... formats
> >>> 
> >>> I don't see that as supported in SplashColorMode, so if my guess is
> >>> right that you want to use your initial data as "background", painting
> >>> will fail if the data is not in the correct SplashColorMode
> >> 
> >> Indeed. That's up to the user to know what it does if he provide his own
> >> data. That must be mentioned in the doc.
> > 
> > Ok, i understand you are at least working for a patch for SplashOutputDev
> > too, right?
> 
> Yes. I also have to pass that data to the OutputDev too. When you say 'at
> least', there are other places to change ?

Not sure, SplashOutputDev was the first thing that came to mind.

Albert

> 
> Vincent Torri


More information about the poppler mailing list