Don't use the CreateWithData variant: not needed, and isn't available in chrome

git-svn-id: http://skia.googlecode.com/svn/trunk@1763 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-06-29 20:12:38 +00:00
parent 0a09eef790
commit cd88d7c233

View File

@ -196,12 +196,13 @@ bool SkPDFDocumentToBitmap(SkStream* stream, SkBitmap* output) {
size_t bitsPerComponent;
CGBitmapInfo info;
getBitmapInfo(bitmap, &bitsPerComponent, &info, NULL);
CGContextRef ctx = CGBitmapContextCreateWithData(bitmap.getPixels(),
w, h, bitsPerComponent,
bitmap.rowBytes(),
CGColorSpaceCreateDeviceRGB(),
info, NULL, NULL);
CGColorSpaceRef cs = CGColorSpaceCreateDeviceRGB();
CGContextRef ctx = CGBitmapContextCreate(bitmap.getPixels(), w, h,
bitsPerComponent, bitmap.rowBytes(),
cs, info);
CGColorSpaceRelease(cs);
if (ctx) {
CGContextDrawPDFPage(ctx, page);
CGContextRelease(ctx);