Minor code simplification.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2011-02-01 12:43:31 +00:00
parent 45e539fff8
commit 348e3367d9

View File

@ -84,15 +84,9 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
lut = CGColorSpaceCreateDeviceRGB();
// a release callback is necessary when the fl_gc is a print context because the image data
// must be kept until the page is closed. Thus tmpBuf can't be deleted here. It's too early.
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
typedef void (*CGDataProviderReleaseDataCallback) (
void *info,
const void *data,
size_t size
);
#endif
CGDataProviderReleaseDataCallback releaseCB = ( tmpBuf ? dataReleaseCB : NULL);
CGDataProviderRef src = CGDataProviderCreateWithData( 0L, array, linedelta*H, releaseCB);
CGDataProviderRef src = CGDataProviderCreateWithData( 0L, array, linedelta*H,
tmpBuf ? dataReleaseCB : NULL
);
CGImageRef img = CGImageCreate( W, H, 8, 8*delta, linedelta,
//lut, delta&1?kCGImageAlphaNone:kCGImageAlphaNoneSkipLast,
lut, delta&1?kCGImageAlphaNone:kCGImageAlphaLast,