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

Unified Diff: ui/gfx/image/image_mac.mm

Issue 10535079: Revert 141206 - NSImageRep can have a size which is not it's pixel size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 months 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 | ui/gfx/image/image_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_mac.mm
===================================================================
--- ui/gfx/image/image_mac.mm (revision 141213)
+++ ui/gfx/image/image_mac.mm (working copy)
@@ -17,8 +17,7 @@
gfx::ImageSkia NSImageToImageSkia(NSImage* image) {
gfx::ImageSkia image_skia;
for (NSImageRep* imageRep in [image representations]) {
- NSSize imageRepSize =
- NSMakeSize([imageRep pixelsWide], [imageRep pixelsHigh]);
+ NSSize imageRepSize = [imageRep size];
SkBitmap bitmap(gfx::NSImageRepToSkBitmap(imageRep, imageRepSize, false));
if (!bitmap.isNull() && !bitmap.empty()) {
float scaleFactor = imageRepSize.width / [image size].width;
« no previous file with comments | « no previous file | ui/gfx/image/image_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698