diff options
author | chase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 03:45:01 +0000 |
---|---|---|
committer | chase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 03:45:01 +0000 |
commit | 41716c7e13490f39651f48f97f059a426dd0b41f (patch) | |
tree | d074d35fde0e7d95b9c4a353b28f809182d19da9 /skia | |
parent | e424552ce05ea8121a9c474f271abff6ae5c18f4 (diff) | |
download | chromium_src-41716c7e13490f39651f48f97f059a426dd0b41f.zip chromium_src-41716c7e13490f39651f48f97f059a426dd0b41f.tar.gz chromium_src-41716c7e13490f39651f48f97f059a426dd0b41f.tar.bz2 |
Revert r71208 "Mac: Explicitly set the colorspace on SkBitmap -> CGImageRef conversions"
This is a test to look for the cause of a steady
vm_rss_final_b regression on the Mac 10.5 intl2 page
cycler.
BUG=74775
TBR=thakis@chromium.org
Review URL: http://codereview.chromium.org/6609010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76709 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/skia_utils_mac.h | 8 | ||||
-rw-r--r-- | skia/ext/skia_utils_mac.mm | 12 |
2 files changed, 3 insertions, 17 deletions
diff --git a/skia/ext/skia_utils_mac.h b/skia/ext/skia_utils_mac.h index 0551643..9a1636e 100644 --- a/skia/ext/skia_utils_mac.h +++ b/skia/ext/skia_utils_mac.h @@ -64,13 +64,7 @@ SkBitmap CGImageToSkBitmap(CGImageRef image); // Draws an NSImage with a given size into a SkBitmap. SkBitmap NSImageToSkBitmap(NSImage* image, NSSize size, bool is_opaque); -// Given an SkBitmap and a color space, return an autoreleased NSImage. -NSImage* SkBitmapToNSImageWithColorSpace(const SkBitmap& icon, - CGColorSpaceRef colorSpace); - -// Given an SkBitmap, return an autoreleased NSImage in the generic color space. -// DEPRECATED, use SkBitmapToNSImageWithColorSpace() instead. -// TODO(thakis): Remove this -- http://crbug.com/69432 +// Given an SkBitmap, return an autoreleased NSImage. NSImage* SkBitmapToNSImage(const SkBitmap& icon); // Returns |[NSImage imageNamed:@"NSApplicationIcon"]| as SkBitmap. diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm index 171d329..f52709b 100644 --- a/skia/ext/skia_utils_mac.mm +++ b/skia/ext/skia_utils_mac.mm @@ -167,14 +167,12 @@ SkBitmap NSImageToSkBitmap(NSImage* image, NSSize size, bool is_opaque) { return bitmap; } -NSImage* SkBitmapToNSImageWithColorSpace(const SkBitmap& skiaBitmap, - CGColorSpaceRef colorSpace) { +NSImage* SkBitmapToNSImage(const SkBitmap& skiaBitmap) { if (skiaBitmap.isNull()) return nil; // First convert SkBitmap to CGImageRef. - CGImageRef cgimage = - SkCreateCGImageRefWithColorspace(skiaBitmap, colorSpace); + CGImageRef cgimage = SkCreateCGImageRef(skiaBitmap); // Now convert to NSImage. NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc] @@ -186,12 +184,6 @@ NSImage* SkBitmapToNSImageWithColorSpace(const SkBitmap& skiaBitmap, return image; } -NSImage* SkBitmapToNSImage(const SkBitmap& skiaBitmap) { - base::mac::ScopedCFTypeRef<CGColorSpaceRef> colorSpace( - CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB)); - return SkBitmapToNSImageWithColorSpace(skiaBitmap, colorSpace.get()); -} - SkBitmap AppplicationIconAtSize(int size) { NSImage* image = [NSImage imageNamed:@"NSApplicationIcon"]; return NSImageToSkBitmap(image, NSMakeSize(size, size), /* is_opaque=*/true); |