diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 21:52:02 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 21:52:02 +0000 |
commit | 6e55c884916468a05c9d3f1ed4d4641609d98353 (patch) | |
tree | 45fd4a8f3213f7380af9725a177e3cac6623c1da /skia | |
parent | f360e7daa5377b5701d5520427c90bf83b80f82e (diff) | |
download | chromium_src-6e55c884916468a05c9d3f1ed4d4641609d98353.zip chromium_src-6e55c884916468a05c9d3f1ed4d4641609d98353.tar.gz chromium_src-6e55c884916468a05c9d3f1ed4d4641609d98353.tar.bz2 |
Make Mac bitmaps use BGRA to match the MD5 hash Apple uses in its WebKit expectations. Use a png for "missingImage" because it has the color range to match the TIFF used by Apple in its expectations.
Review URL: http://codereview.chromium.org/17211
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rwxr-xr-x | skia/ext/bitmap_platform_device_mac.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc index b338c9f..f544684 100755 --- a/skia/ext/bitmap_platform_device_mac.cc +++ b/skia/ext/bitmap_platform_device_mac.cc @@ -169,10 +169,13 @@ BitmapPlatformDeviceMac* BitmapPlatformDeviceMac::Create(CGContextRef context, CGColorSpaceRef color_space = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); - // allocate a bitmap context with 4 components per pixel (RGBA): + // allocate a bitmap context with 4 components per pixel (BGRA). Apple + // recommends these flags for improved CG performance. CGContextRef bitmap_context = CGBitmapContextCreate(data, width, height, 8, width*4, - color_space, kCGImageAlphaPremultipliedLast); + color_space, + kCGImageAlphaPremultipliedFirst | + kCGBitmapByteOrder32Host); // Change the coordinate system to match WebCore's CGContextTranslateCTM(bitmap_context, 0, height); |