< prev index next >

src/java.desktop/share/native/libawt/java2d/loops/ByteIndexed.h

Print this page

        

*** 41,51 **** #define DeclareByteIndexedLoadVars(PREFIX) \ jint *PREFIX ## Lut; #define DeclareByteIndexedStoreVars(PREFIX) \ ! int PREFIX ## XDither, PREFIX ## YDither; \ char *PREFIX ## rerr, *PREFIX ## gerr, *PREFIX ## berr; \ unsigned char *PREFIX ## InvLut; #define SetByteIndexedStoreVarsYPos(PREFIX, pRasInfo, LOC) \ do { \ --- 41,51 ---- #define DeclareByteIndexedLoadVars(PREFIX) \ jint *PREFIX ## Lut; #define DeclareByteIndexedStoreVars(PREFIX) \ ! int PREFIX ## XDither, PREFIX ## YDither, PREFIX ## RepPrims; \ char *PREFIX ## rerr, *PREFIX ## gerr, *PREFIX ## berr; \ unsigned char *PREFIX ## InvLut; #define SetByteIndexedStoreVarsYPos(PREFIX, pRasInfo, LOC) \ do { \
*** 68,77 **** --- 68,78 ---- */ #define InitByteIndexedStoreVarsY(PREFIX, pRasInfo) \ do { \ SetByteIndexedStoreVarsYPos(PREFIX, pRasInfo, (pRasInfo)->bounds.y1); \ PREFIX ## InvLut = (pRasInfo)->invColorTable; \ + PREFIX ## RepPrims = (pRasInfo)->representsPrimaries; \ } while (0) #define InitByteIndexedStoreVarsX(PREFIX, pRasInfo) \ SetByteIndexedStoreVarsXPos(PREFIX, pRasInfo, (pRasInfo)->bounds.x1);
*** 166,178 **** --- 167,184 ---- #define StoreByteIndexedFrom1IntArgb(pRas, PREFIX, x, argb) \ StoreByteIndexedFrom1IntRgb(pRas, PREFIX, x, argb) #define StoreByteIndexedFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \ do { \ + if (!(((r == 0) || (r == 255)) && \ + ((g == 0) || (g == 255)) && \ + ((b == 0) || (b == 255)) && \ + PREFIX ## RepPrims)) { \ r += PREFIX ## rerr[PREFIX ## XDither]; \ g += PREFIX ## gerr[PREFIX ## XDither]; \ b += PREFIX ## berr[PREFIX ## XDither]; \ + } \ ByteClamp3Components(r, g, b); \ (pRas)[x] = SurfaceData_InvColorMap(PREFIX ## InvLut, r, g, b); \ } while (0) #define StoreByteIndexedFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \
< prev index next >