[poppler] [patch] using external data in SplashBitmap
Vincent Torri
vtorri at univ-evry.fr
Mon Oct 25 06:29:57 PDT 2010
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.
>
>> It's not finished yet as i have some questions (and doc is not
>> added):
>>
>> * is the coding style good ?
>
> Seems Ok
>
>> * i don't think I break ABI.
>
> You break the Splash abi, but we don't care about it.
well, i added the isDataExternal at the end of the class. I thought that,
doing like that, i didn't break ABI. I broke API but the current uses are
not broken.
>> * 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 know what to do if topDown is true.
>
> Probably the same as if it is false.
You mean : nothing ? :)
thank you
Vincent Torri
More information about the poppler
mailing list