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

Issue 10086023: Expose array of bitmaps contained by gfx::Image similar to NSImage (Closed)

Created:
8 years, 8 months ago by pkotwicz
Modified:
8 years, 8 months ago
Reviewers:
Robert Sesek, sky
CC:
chromium-reviews, sadrul, ben+watch_chromium.org, grt+watch_chromium.org, amit, mihaip+watch_chromium.org, apatrick_chromium, Aaron Boodman, pam+watch_chromium.org, tfarina, robertshield, oshima, reed1
Visibility:
Public.

Description

On the Mac, we populate NSImage from bitmaps in resource bundles. Introduce ImageSkia which contains vector of SkBitmaps. Previously this functionality was within ImageRepSkia. ImageSkia exposes this. Move gfx::Image::GetSkBitmapAtIndex and gfx::Image::GetNumSkBitmaps to ImageSkia BUG=122992 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=133607

Patch Set 1 #

Total comments: 16

Patch Set 2 : Changes as requested #

Patch Set 3 : Nicer diff #

Total comments: 6

Patch Set 4 : Changes as requested #

Total comments: 10

Patch Set 5 : Changes as requested #

Patch Set 6 : Nicer diff #

Patch Set 7 : Nicer diff #

Patch Set 8 : Nicer diff #

Patch Set 9 : Fix CQ bot compile error #

Patch Set 10 : Nicer diff #

Patch Set 11 : #

Patch Set 12 : Nicer diff #

Patch Set 13 : Nicer diff #

Patch Set 14 : Nicer diff #

Unified diffs Side-by-side diffs Delta from patch set Stats (+328 lines, -79 lines) Patch
M chrome/browser/extensions/image_loading_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/themes/browser_theme_pack.cc View 1 2 3 4 3 chunks +13 lines, -8 lines 0 comments Download
M chrome/browser/web_applications/web_app_mac.mm View 1 2 3 4 2 chunks +5 lines, -3 lines 0 comments Download
M ui/gfx/canvas.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M ui/gfx/canvas.cc View 1 3 chunks +20 lines, -8 lines 0 comments Download
M ui/gfx/image/image.h View 1 3 chunks +2 lines, -10 lines 0 comments Download
M ui/gfx/image/image.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +22 lines, -37 lines 0 comments Download
M ui/gfx/image/image_mac_unittest.mm View 1 2 3 4 chunks +7 lines, -6 lines 0 comments Download
A ui/gfx/image/image_skia.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +90 lines, -0 lines 0 comments Download
A ui/gfx/image/image_skia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +146 lines, -0 lines 0 comments Download
M ui/gfx/image/image_unittest.cc View 1 2 3 3 chunks +7 lines, -4 lines 0 comments Download
M ui/ui.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
pkotwicz
This is the first part for properly scaling bitmaps in views in high DPI mode. ...
8 years, 8 months ago (2012-04-14 00:15:34 UTC) #1
sky
rsesek should review this first. http://codereview.chromium.org/10086023/diff/1/ui/gfx/image/image.h File ui/gfx/image/image.h (right): http://codereview.chromium.org/10086023/diff/1/ui/gfx/image/image.h#newcode102 ui/gfx/image/image.h:102: const ImageSkia* ToImageSkia() const; ...
8 years, 8 months ago (2012-04-16 14:35:26 UTC) #2
Robert Sesek
http://codereview.chromium.org/10086023/diff/1/ui/gfx/image/image.cc File ui/gfx/image/image.cc (right): http://codereview.chromium.org/10086023/diff/1/ui/gfx/image/image.cc#newcode391 ui/gfx/image/image.cc:391: rep = new internal::ImageRepSkia(bitmaps); an internal::ImageRepSkia is still being ...
8 years, 8 months ago (2012-04-16 16:06:01 UTC) #3
Tom Hudson
Just to make a record of our discussion here, we think you're on the right ...
8 years, 8 months ago (2012-04-18 19:10:36 UTC) #4
reed1
As an alternative style for the class... class MultiBitmap { public: MultiBitmap(const SkBitmap&); MultiBitmap(vector<>...., const ...
8 years, 8 months ago (2012-04-18 20:52:47 UTC) #5
pkotwicz
Changes as requested. Added Draw methods to ImageSkia as suggested by reed@ http://codereview.chromium.org/10086023/diff/1/ui/gfx/image/image.h File ui/gfx/image/image.h ...
8 years, 8 months ago (2012-04-19 03:15:05 UTC) #6
reed1
My proposal was probably more defensive : I was suggesting that we don't need to ...
8 years, 8 months ago (2012-04-19 12:23:58 UTC) #7
pkotwicz
Currently we are using the getters/iterators for unittests. We use the iterator to transform each ...
8 years, 8 months ago (2012-04-19 13:48:10 UTC) #8
reed1
perhaps separate from this CL, I'd like to understand the "transform the image" or any ...
8 years, 8 months ago (2012-04-19 13:50:16 UTC) #9
pkotwicz
I looked at what transformations exist. It seems as if the requirement is the following: ...
8 years, 8 months ago (2012-04-19 18:25:28 UTC) #10
pkotwicz
I suggest looking deeper into whether ImageSkia::bitmaps() can be improved in a separate CL. reed1, ...
8 years, 8 months ago (2012-04-19 18:28:47 UTC) #11
reed1
My comments are only related to the interface design, in terms of how closely it ...
8 years, 8 months ago (2012-04-19 18:36:59 UTC) #12
Robert Sesek
http://codereview.chromium.org/10086023/diff/1/ui/gfx/image/image.cc File ui/gfx/image/image.cc (right): http://codereview.chromium.org/10086023/diff/1/ui/gfx/image/image.cc#newcode391 ui/gfx/image/image.cc:391: rep = new internal::ImageRepSkia(bitmaps); On 2012/04/16 16:06:01, rsesek wrote: ...
8 years, 8 months ago (2012-04-19 19:12:48 UTC) #13
pkotwicz
Changes as requested. Added ImageSkia::bitmaps() method removed ImageSkia::bitmap(), ImageSkia::GetBitmapCount(), ImageSkia::GetBitmapAt() This makes the class a ...
8 years, 8 months ago (2012-04-19 21:21:26 UTC) #14
Robert Sesek
LGTM http://codereview.chromium.org/10086023/diff/18003/chrome/browser/web_applications/web_app_mac.mm File chrome/browser/web_applications/web_app_mac.mm (right): http://codereview.chromium.org/10086023/diff/18003/chrome/browser/web_applications/web_app_mac.mm#newcode205 chrome/browser/web_applications/web_app_mac.mm:205: SkBitmapToImageRep(*bitmaps[i]); nit: can you join this with the ...
8 years, 8 months ago (2012-04-20 16:33:14 UTC) #15
pkotwicz
sky for OWNERS
8 years, 8 months ago (2012-04-20 17:07:56 UTC) #16
sky
http://codereview.chromium.org/10086023/diff/18003/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): http://codereview.chromium.org/10086023/diff/18003/ui/gfx/image/image_skia.cc#newcode17 ui/gfx/image/image_skia.cc:17: DCHECK(bitmap); Is this DCHECK useful? Seems like this would ...
8 years, 8 months ago (2012-04-20 19:31:53 UTC) #17
pkotwicz
Changes as requested http://codereview.chromium.org/10086023/diff/18003/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): http://codereview.chromium.org/10086023/diff/18003/ui/gfx/image/image_skia.cc#newcode122 ui/gfx/image/image_skia.cc:122: float y_scale_factor) const { To address ...
8 years, 8 months ago (2012-04-20 20:39:54 UTC) #18
pkotwicz
8 years, 8 months ago (2012-04-20 21:00:14 UTC) #19
pkotwicz
8 years, 8 months ago (2012-04-20 21:06:34 UTC) #20
sky
LGTM Please add comment as to why const_cast is safe.
8 years, 8 months ago (2012-04-20 21:16:15 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10086023/31005
8 years, 8 months ago (2012-04-23 19:04:03 UTC) #22
commit-bot: I haz the power
Try job failure for 10086023-31005 (retry) on android for steps "Compile, build". It's a second ...
8 years, 8 months ago (2012-04-23 19:18:26 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10086023/42002
8 years, 8 months ago (2012-04-23 19:42:27 UTC) #24
commit-bot: I haz the power
Try job failure for 10086023-42002 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 8 months ago (2012-04-23 20:03:53 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10086023/39004
8 years, 8 months ago (2012-04-23 20:44:54 UTC) #26
commit-bot: I haz the power
Try job failure for 10086023-39004 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 8 months ago (2012-04-23 21:06:19 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10086023/52001
8 years, 8 months ago (2012-04-23 21:21:36 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10086023/61002
8 years, 8 months ago (2012-04-23 22:28:19 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10086023/59003
8 years, 8 months ago (2012-04-23 22:44:59 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pkotwicz@chromium.org/10086023/54003
8 years, 8 months ago (2012-04-24 00:22:36 UTC) #31
commit-bot: I haz the power
8 years, 8 months ago (2012-04-24 02:26:18 UTC) #32
Change committed as 133607

Powered by Google App Engine
This is Rietveld 408576698