src/solaris/native/sun/java2d/x11/XRBackendNative.c
Print this page
rev 6829 : Fix Xrender backend on 64-bit Big-endian architectures
@@ -740,11 +740,14 @@
}
for (i=0; i < glyphCnt; i++) {
GlyphInfo *jginfo = (GlyphInfo *) jlong_to_ptr(glyphInfoPtrs[i]);
- gid[i] = (Glyph) (0x0ffffffffL & ((unsigned long)(jginfo->cellInfo)));
+ // 'jginfo->cellInfo' is of type 'void*' (see definition of 'GlyphInfo' in fontscalerdefs.h)
+ // 'Glyph' is typedefed to 'unsigned long' (see http://www.x.org/releases/X11R7.7/doc/libXrender/libXrender.txt)
+ // Maybe we should assert that (sizeof(void*) == sizeof(Glyph)) ?
+ gid[i] = (Glyph) (jginfo->cellInfo);
xginfo[i].x = (-jginfo->topLeftX);
xginfo[i].y = (-jginfo->topLeftY);
xginfo[i].width = jginfo->width;
xginfo[i].height = jginfo->height;
xginfo[i].xOff = round(jginfo->advanceX);