diff options
author | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 21:51:10 +0000 |
---|---|---|
committer | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 21:51:10 +0000 |
commit | 265cf96b080c4196c268c0cc1a87186b0aee3b61 (patch) | |
tree | 820b7cd18d60618c2239da446c5b21678ca09280 /skia | |
parent | 172d0abca7044b8b5662f376a2645c22d2351c65 (diff) | |
download | chromium_src-265cf96b080c4196c268c0cc1a87186b0aee3b61.zip chromium_src-265cf96b080c4196c268c0cc1a87186b0aee3b61.tar.gz chromium_src-265cf96b080c4196c268c0cc1a87186b0aee3b61.tar.bz2 |
Adjust color spaces so that Mac Chrome renders colors properly.
BUG=19951,20552
TEST=compare pages rendered in Chromium and Safari. They should appear the same.
mark: review
jrg/brettw: FYI
Review URL: http://codereview.chromium.org/194013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25380 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/bitmap_platform_device_mac.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc index 56150ce..0f77406 100644 --- a/skia/ext/bitmap_platform_device_mac.cc +++ b/skia/ext/bitmap_platform_device_mac.cc @@ -6,6 +6,7 @@ #include <time.h> +#include "base/mac_util.h" #include "base/ref_counted.h" #include "skia/ext/skia_utils_mac.h" #include "third_party/skia/include/core/SkMatrix.h" @@ -45,8 +46,6 @@ bool Constrain(int available_size, int* position, int *size) { } static CGContextRef CGContextForData(void* data, int width, int height) { - CGColorSpaceRef color_space = - CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); #define HAS_ARGB_SHIFTS(a, r, g, b) \ (SK_A32_SHIFT == (a) && SK_R32_SHIFT == (r) \ && SK_G32_SHIFT == (g) && SK_B32_SHIFT == (b)) @@ -55,7 +54,7 @@ static CGContextRef CGContextForData(void* data, int width, int height) { // recommends these flags for improved CG performance. CGContextRef context = CGBitmapContextCreate(data, width, height, 8, width * 4, - color_space, + mac_util::GetSystemColorSpace(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host); #else @@ -63,7 +62,6 @@ static CGContextRef CGContextForData(void* data, int width, int height) { image memory layout match. #endif #undef HAS_ARGB_SHIFTS - CGColorSpaceRelease(color_space); if (!context) return NULL; |