[poppler] Adding a new getRGBLine variant

Albert Astals Cid aacid at kde.org
Thu Mar 24 13:10:37 PDT 2011


A Dilluns, 14 de març de 2011, Albert Astals Cid va escriure:
> A Diumenge, 27 de febrer de 2011, Albert Astals Cid va escriure:
> > In GfxColorSpace we have
> > 
> > virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
> > 
> > That gets a color line for the given input and saves it in out as a 32
> > bit integer with each color packed to fit in 8 bits of that 32.
> > 
> > This works very well for cairo as it can pass a pointer to the cairo
> > image data directly but for Splash is not so good as we have to unpack
> > the 32 bit integer to 3 (or 4 if XRGB8 format) different Guchar.
> > 
> > So i'm proposing the addition of
> > virtual void getRGBLine(Guchar *in, Guchar *out, int length);
> > that does basically the same but instead of packing the color just saves
> > it in output directly.
> > 
> > In my tests this gives us around a 5% free speedup.
> > 
> > The catch is that in some cases we need to "duplicate" the conversion
> > code since it is not really easy to generalize the code.
> > 
> > I'm attaching a work-in-progress patch.
> > 
> > Comments?
> 
> I understand no comments means everyone agrees, right?

Commited it.

Albert

> 
> Albert
> 
> > Albert
> 
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list