< prev index next >
src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m
Print this page
rev 54086 : 8240487: Cleanup whitespace in .cc, .hh, .m, and .mm files
@@ -206,15 +206,15 @@
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,11 +224,11 @@
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,11 +242,11 @@
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,11 +294,11 @@
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,11 +399,11 @@
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,11 +740,11 @@
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 >