< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m

Print this page

        

*** 206,220 **** int i; const char* pGammaEnv = getenv("J2D_LCD_REVERSE_GAMMA"); if (pGammaEnv != NULL) { reverseGamma = atol(pGammaEnv); } ! if (reverseGamma < 100 || reverseGamma > 250) { reverseGamma = 180; } ! gamma = 100.0 / reverseGamma; for (i = 0; i < 256; i++) { double x = ((double)i) / 255.0; reverseGammaLut[i] = (UInt8)(255 * pow(x, gamma)); } --- 206,220 ---- int i; const char* pGammaEnv = getenv("J2D_LCD_REVERSE_GAMMA"); if (pGammaEnv != NULL) { reverseGamma = atol(pGammaEnv); } ! if (reverseGamma < 100 || reverseGamma > 250) { reverseGamma = 180; } ! gamma = 100.0 / reverseGamma; for (i = 0; i < 256; i++) { double x = ((double)i) / 255.0; reverseGammaLut[i] = (UInt8)(255 * pow(x, gamma)); }
*** 224,234 **** static inline void CGGI_CopyARGBPixelToRGBPixel(const UInt32 p, UInt8 *dst) { UInt8* lut = getReverseGammaLut(); ! *(dst + 0) = lut[0xFF - (p >> 16 & 0xFF)]; // red *(dst + 1) = lut[0xFF - (p >> 8 & 0xFF)]; // green *(dst + 2) = lut[0xFF - (p & 0xFF)]; // blue } --- 224,234 ---- static inline void CGGI_CopyARGBPixelToRGBPixel(const UInt32 p, UInt8 *dst) { UInt8* lut = getReverseGammaLut(); ! *(dst + 0) = lut[0xFF - (p >> 16 & 0xFF)]; // red *(dst + 1) = lut[0xFF - (p >> 8 & 0xFF)]; // green *(dst + 2) = lut[0xFF - (p & 0xFF)]; // blue }
*** 242,252 **** size_t destRowWidth = info->width; size_t height = info->height; size_t y; ! // fill empty glyph image with black-on-white glyph for (y = 0; y < height; y++) { size_t destRow = y * destRowWidth * 3; size_t srcRow = y * srcRowWidth; --- 242,252 ---- size_t destRowWidth = info->width; size_t height = info->height; size_t y; ! // fill empty glyph image with black-on-white glyph for (y = 0; y < height; y++) { size_t destRow = y * destRowWidth * 3; size_t srcRow = y * srcRowWidth;
*** 294,304 **** size_t destRowWidth = info->width; size_t height = info->height; size_t y; ! // fill empty glyph image with black-on-white glyph for (y = 0; y < height; y++) { size_t destRow = y * destRowWidth; size_t srcRow = y * srcRowWidth; size_t x; --- 294,304 ---- size_t destRowWidth = info->width; size_t height = info->height; size_t y; ! // fill empty glyph image with black-on-white glyph for (y = 0; y < height; y++) { size_t destRow = y * destRowWidth; size_t srcRow = y * srcRowWidth; size_t x;
*** 399,409 **** colorSpace, bmpInfo); // set foreground color CGContextSetRGBFillColor(canvas->context, 0.0f, 0.0f, 0.0f, 1.0f); ! CGContextSetFontSize(canvas->context, 1); CGContextSaveGState(canvas->context); CGColorSpaceRelease(colorSpace); } --- 399,409 ---- colorSpace, bmpInfo); // set foreground color CGContextSetRGBFillColor(canvas->context, 0.0f, 0.0f, 0.0f, 1.0f); ! CGContextSetFontSize(canvas->context, 1); CGContextSaveGState(canvas->context); CGColorSpaceRelease(colorSpace); }
*** 740,750 **** NSMutableDictionary *threadDict = [[NSThread currentThread] threadDictionary]; NSString* theKey = (mode->glyphDescriptor == &rgb) ? threadLocalLCDCanvasKey : threadLocalAACanvasKey; ! CGGI_GlyphCanvas *canvas = [threadDict objectForKey:theKey]; if (canvas == nil) { canvas = [[CGGI_GlyphCanvas alloc] init]; [threadDict setObject:canvas forKey:theKey]; } --- 740,750 ---- NSMutableDictionary *threadDict = [[NSThread currentThread] threadDictionary]; NSString* theKey = (mode->glyphDescriptor == &rgb) ? threadLocalLCDCanvasKey : threadLocalAACanvasKey; ! CGGI_GlyphCanvas *canvas = [threadDict objectForKey:theKey]; if (canvas == nil) { canvas = [[CGGI_GlyphCanvas alloc] init]; [threadDict setObject:canvas forKey:theKey]; }
< prev index next >