Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1658)

Unified Diff: skia/ext/skia_utils_mac.mm

Issue 11567049: mac: Handle hidpi cursors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/glue/webcursor.h » ('j') | webkit/glue/webcursor_mac.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/skia_utils_mac.mm
diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm
index e95635b1b87bf1cda091d9803094a1c73e478be8..c0db0132ab9ffabd4a32554a76fca25cd71147ab 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)];
Avi (use Gerrit) 2012/12/14 21:46:26 Nice change, but I'm not sure how it relates to cu
Nico 2012/12/14 21:49:37 I was reading this file while working on this chan
[image setSize:NSMakeSize(skiaBitmap.width(), skiaBitmap.height())];
return [image.release() autorelease];
}
« no previous file with comments | « no previous file | webkit/glue/webcursor.h » ('j') | webkit/glue/webcursor_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698