summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-15 02:34:29 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-15 02:34:29 +0000
commitf3d6342838535075b2f56b11a23a961a4b67fa04 (patch)
tree87b6a32139e9d9049e2365f9683b030ce5de51a8 /skia
parent47bf3bfa84f9a754b696603f3380f39cc969164b (diff)
downloadchromium_src-f3d6342838535075b2f56b11a23a961a4b67fa04.zip
chromium_src-f3d6342838535075b2f56b11a23a961a4b67fa04.tar.gz
chromium_src-f3d6342838535075b2f56b11a23a961a4b67fa04.tar.bz2
mac: Handle hidpi cursors.
Also remove some more 10.5 code. BUG=161613 TEST=/Users/thakis/Downloads/cursors/cursor-imgset.html TBR=tony Review URL: https://codereview.chromium.org/11567049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173258 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/ext/skia_utils_mac.mm10
1 files changed, 2 insertions, 8 deletions
diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm
index e95635b..c0db013 100644
--- a/skia/ext/skia_utils_mac.mm
+++ b/skia/ext/skia_utils_mac.mm
@@ -235,15 +235,9 @@ NSImage* SkBitmapToNSImageWithColorSpace(const SkBitmap& skiaBitmap,
if (skiaBitmap.isNull())
return nil;
- // First convert SkBitmap to CGImageRef.
- base::mac::ScopedCFTypeRef<CGImageRef> cgimage(
- SkCreateCGImageRefWithColorspace(skiaBitmap, colorSpace));
-
- // Now convert to NSImage.
- scoped_nsobject<NSBitmapImageRep> bitmap(
- [[NSBitmapImageRep alloc] initWithCGImage:cgimage]);
scoped_nsobject<NSImage> image([[NSImage alloc] init]);
- [image addRepresentation:bitmap];
+ [image addRepresentation:
+ SkBitmapToNSBitmapImageRepWithColorSpace(skiaBitmap, colorSpace)];
[image setSize:NSMakeSize(skiaBitmap.width(), skiaBitmap.height())];
return [image.release() autorelease];
}