On Tue, 23 Nov 2010 14:45:38 -0500, Adam Jackson <[email protected]> wrote:

>  typedef struct {
> -    unsigned char sha1[20];
> +    unsigned char sha1[16];
>  } ExaCachedGlyphRec, *ExaCachedGlyphPtr;

Ick. This seems like an ugly kludge. I'd rather see it retain the full
size and just move to the end of the struct so that the pointers get
aligned correctly. Yeah, yeah, oword compares.

> +    int              glyph_size = sizeof(GlyphRec)
> +                                  + screenInfo.numScreens * sizeof 
> (PicturePtr)
> +                                  + dixPrivatesSize(PRIVATE_GLYPH);

How about a function for this? I can imagine getting this wrong. Make it
static inline if you don't want to see it using space in a non-dmx build.

> diff --git a/render/glyph.c b/render/glyph.c
> index 7193d47..4556046 100644
> --- a/render/glyph.c
> +++ b/render/glyph.c
> @@ -128,7 +128,7 @@ GlyphRefPtr
>  FindGlyphRef (GlyphHashPtr   hash,
>             CARD32            signature,
>             Bool              match,
> -           unsigned char     sha1[20])
> +           unsigned char     sha1[16])

It'd be nice to have a typedef or a #define for the size.x

-- 
[email protected]

Attachment: pgp33aneV9orR.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to