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

Issue 10545069: Fixes conversion from NSImage to ImageSkia when NSImageRep has size which isn't it's pixel size (Closed)

Created:
8 years, 6 months ago by pkotwicz
Modified:
8 years, 6 months ago
Reviewers:
Nico, sky
CC:
chromium-reviews
Visibility:
Public.

Description

NSImageRep can have a size which is not it's pixel size. Fix conversion between NSImage to ImageSkia for when this is the case. Also fix the unittest so that it passes on HiDPI mac and changed unittest constants to be kWidth1x, kHeight1x etc Test=ImageMacTest.NSImageWithResizedNSImageRepToImageSkia Bug=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141616

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Fix unittests such that they can run on Mac in high DPI mode #

Patch Set 4 : Fix unittests such that they can run on Mac in high DPI mode #

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -42 lines) Patch
M ui/gfx/image/image_mac.mm View 1 chunk +2 lines, -1 line 0 comments Download
M ui/gfx/image/image_mac_unittest.mm View 1 2 3 4 5 6 7 8 3 chunks +71 lines, -41 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
pkotwicz
8 years, 6 months ago (2012-06-07 21:23:04 UTC) #1
Nico
LGTM When does this happen?
8 years, 6 months ago (2012-06-07 21:25:15 UTC) #2
pkotwicz
I am unsure as to how this can happen other than the way that I ...
8 years, 6 months ago (2012-06-07 21:39:07 UTC) #3
pkotwicz
sky for OWNERS
8 years, 6 months ago (2012-06-07 21:39:46 UTC) #4
sky
Rubber stamp LGTM
8 years, 6 months ago (2012-06-07 22:18:29 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10545069/2001
8 years, 6 months ago (2012-06-08 13:05:23 UTC) #6
commit-bot: I haz the power
Change committed as 141206
8 years, 6 months ago (2012-06-08 14:55:39 UTC) #7
pkotwicz
Nico, can you check the style for CreateBitmapImageRep in image_mac_unittest. Not sure about Objective C ...
8 years, 6 months ago (2012-06-11 01:42:18 UTC) #8
Nico
http://codereview.chromium.org/10545069/diff/10002/ui/gfx/image/image_mac_unittest.mm File ui/gfx/image/image_mac_unittest.mm (right): http://codereview.chromium.org/10545069/diff/10002/ui/gfx/image/image_mac_unittest.mm#newcode35 ui/gfx/image/image_mac_unittest.mm:35: NSRect request_rect = NSMakeRect(0, 0, static_cast<float>(width) / x_scale, Remove ...
8 years, 6 months ago (2012-06-11 05:05:14 UTC) #9
pkotwicz
Create NSBitmapImageRep directly as recommended. Don't draw anything as it is not necessary for the ...
8 years, 6 months ago (2012-06-11 15:03:05 UTC) #10
Nico
lgtm with comments addressed http://codereview.chromium.org/10545069/diff/1003/ui/gfx/image/image_mac_unittest.mm File ui/gfx/image/image_mac_unittest.mm (right): http://codereview.chromium.org/10545069/diff/1003/ui/gfx/image/image_mac_unittest.mm#newcode21 ui/gfx/image/image_mac_unittest.mm:21: *image_rep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL ...
8 years, 6 months ago (2012-06-11 15:23:07 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10545069/6006
8 years, 6 months ago (2012-06-11 16:50:21 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10545069/6006
8 years, 6 months ago (2012-06-11 18:46:39 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10545069/6006
8 years, 6 months ago (2012-06-12 03:27:57 UTC) #14
commit-bot: I haz the power
8 years, 6 months ago (2012-06-12 04:59:42 UTC) #15
Change committed as 141616

Powered by Google App Engine
This is Rietveld 408576698