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 263253003: Allows arbitrary scale factor in ImageSkia. (Closed)

Created:
6 years, 7 months ago by Jun Mukai
Modified:
6 years, 7 months ago
CC:
chromium-reviews, rsesek+watch_chromium.org, tbarzic
Visibility:
Public.

Description

Allows arbitrary scale factor in ImageSkia. Previously ImageSkia requests the current device scale factor and then pray everything is okay. Now it fetches the best fitting scale factor and then scale the image on ImageSkia side. BUG=372212 R=oshima@chromium.org, ananta@chromium.org TBR=msw@chromium.org, jyasskin@chromium.org TEST=ui_unittests --gtest_filter='ImageSkiaTest.*' Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270582

Patch Set 1 #

Total comments: 5

Patch Set 2 : half fix #

Patch Set 3 : fix #

Total comments: 7

Patch Set 4 : fix #

Patch Set 5 : fix #

Total comments: 2

Patch Set 6 : fix #

Patch Set 7 : fix #

Patch Set 8 : with unscaled #

Patch Set 9 : reset upstream #

Total comments: 4

Patch Set 10 : rebase #

Patch Set 11 : fix #

Total comments: 8

Patch Set 12 : fix #

Patch Set 13 : cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -19 lines) Patch
M chrome/browser/extensions/extension_icon_image_unittest.cc View 1 2 3 4 5 6 1 chunk +6 lines, -4 lines 0 comments Download
M ui/gfx/image/image_skia.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gfx/image/image_skia.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +71 lines, -4 lines 0 comments Download
M ui/gfx/image/image_skia_unittest.cc View 1 2 3 4 5 6 7 8 9 13 chunks +170 lines, -11 lines 0 comments Download
M ui/gfx/switches.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/switches.cc View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
Jun Mukai
6 years, 7 months ago (2014-05-05 18:43:31 UTC) #1
oshima
ananta, can you try this patch and see if this works on win or cause ...
6 years, 7 months ago (2014-05-06 18:52:27 UTC) #2
ananta
On 2014/05/06 18:52:27, oshima wrote: > ananta, can you try this patch and see if ...
6 years, 7 months ago (2014-05-06 19:12:56 UTC) #3
oshima
On 2014/05/06 19:12:56, ananta wrote: > On 2014/05/06 18:52:27, oshima wrote: > > ananta, can ...
6 years, 7 months ago (2014-05-06 19:19:24 UTC) #4
Jun Mukai
https://codereview.chromium.org/263253003/diff/1/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/1/ui/gfx/image/image_skia.cc#newcode34 ui/gfx/image/image_skia.cc:34: bool IsImageSkiaScaling() { On 2014/05/06 18:52:27, oshima wrote: > ...
6 years, 7 months ago (2014-05-06 19:56:49 UTC) #5
Jun Mukai
https://codereview.chromium.org/263253003/diff/1/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/1/ui/gfx/image/image_skia.cc#newcode156 ui/gfx/image/image_skia.cc:156: if (IsImageSkiaScaling() && scale != 1.0f && scale != ...
6 years, 7 months ago (2014-05-06 20:42:42 UTC) #6
oshima
https://codereview.chromium.org/263253003/diff/40001/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/40001/ui/gfx/image/image_skia.cc#newcode147 ui/gfx/image/image_skia.cc:147: float request_scale = scale; can you use "resource_scale" ? ...
6 years, 7 months ago (2014-05-06 20:59:49 UTC) #7
Jun Mukai
https://codereview.chromium.org/263253003/diff/40001/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/40001/ui/gfx/image/image_skia.cc#newcode147 ui/gfx/image/image_skia.cc:147: float request_scale = scale; On 2014/05/06 20:59:49, oshima wrote: ...
6 years, 7 months ago (2014-05-06 21:06:27 UTC) #8
Jun Mukai
https://codereview.chromium.org/263253003/diff/40001/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/40001/ui/gfx/image/image_skia.cc#newcode154 ui/gfx/image/image_skia.cc:154: request_scale = (*g_supported_scales)[i]; On 2014/05/06 21:06:27, Jun Mukai wrote: ...
6 years, 7 months ago (2014-05-07 00:40:17 UTC) #9
oshima
lgtm, but please wait for ananta's lgtm
6 years, 7 months ago (2014-05-07 17:16:16 UTC) #10
ananta
lgtm
6 years, 7 months ago (2014-05-07 18:23:56 UTC) #11
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 7 months ago (2014-05-07 19:07:22 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/263253003/80001
6 years, 7 months ago (2014-05-07 19:10:44 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-08 03:22:15 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-08 03:37:36 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium
6 years, 7 months ago (2014-05-08 03:37:36 UTC) #16
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 7 months ago (2014-05-08 03:44:51 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/263253003/80001
6 years, 7 months ago (2014-05-08 03:45:17 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-08 09:08:14 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-08 09:22:45 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium
6 years, 7 months ago (2014-05-08 09:22:46 UTC) #21
Jun Mukai
TBR=msw for trivial change of ui/gfx/switches
6 years, 7 months ago (2014-05-08 17:49:02 UTC) #22
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 7 months ago (2014-05-08 17:49:07 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/263253003/80001
6 years, 7 months ago (2014-05-08 17:52:05 UTC) #24
msw
LGTM with a nit; also, will you add an about:flags entry? https://codereview.chromium.org/263253003/diff/80001/ui/gfx/switches.h File ui/gfx/switches.h (right): ...
6 years, 7 months ago (2014-05-08 17:56:06 UTC) #25
oshima
On 2014/05/08 17:56:06, msw wrote: > LGTM with a nit; also, will you add an ...
6 years, 7 months ago (2014-05-08 18:03:01 UTC) #26
Jun Mukai
The CQ bit was unchecked by mukai@chromium.org
6 years, 7 months ago (2014-05-08 18:07:46 UTC) #27
Jun Mukai
https://codereview.chromium.org/263253003/diff/80001/ui/gfx/switches.h File ui/gfx/switches.h (right): https://codereview.chromium.org/263253003/diff/80001/ui/gfx/switches.h#newcode16 ui/gfx/switches.h:16: GFX_EXPORT extern const char kAllowArbitraryScaleFactorInImageSkia[]; On 2014/05/08 17:56:07, msw ...
6 years, 7 months ago (2014-05-08 18:11:01 UTC) #28
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 7 months ago (2014-05-08 18:11:06 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/263253003/100001
6 years, 7 months ago (2014-05-08 18:12:29 UTC) #30
Jun Mukai
Turns out this doesn't handle unscaled images well. Added a fix which is based on ...
6 years, 7 months ago (2014-05-09 01:56:28 UTC) #31
oshima
https://codereview.chromium.org/263253003/diff/150001/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/150001/ui/gfx/image/image_skia.cc#newcode120 ui/gfx/image/image_skia.cc:120: // will fallback to closest image rep. can you ...
6 years, 7 months ago (2014-05-09 16:10:29 UTC) #32
oshima
slgtm On 2014/05/09 16:10:29, oshima wrote: > https://codereview.chromium.org/263253003/diff/150001/ui/gfx/image/image_skia.cc > File ui/gfx/image/image_skia.cc (right): > > https://codereview.chromium.org/263253003/diff/150001/ui/gfx/image/image_skia.cc#newcode120 ...
6 years, 7 months ago (2014-05-09 16:10:56 UTC) #33
Jun Mukai
https://codereview.chromium.org/263253003/diff/150001/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/150001/ui/gfx/image/image_skia.cc#newcode120 ui/gfx/image/image_skia.cc:120: // will fallback to closest image rep. On 2014/05/09 ...
6 years, 7 months ago (2014-05-12 05:23:23 UTC) #34
Jun Mukai
by the way, do we have some issues for this task? I noticed that BUG= ...
6 years, 7 months ago (2014-05-12 05:24:00 UTC) #35
oshima
On 2014/05/12 05:24:00, Jun Mukai wrote: > by the way, do we have some issues ...
6 years, 7 months ago (2014-05-12 20:04:45 UTC) #36
oshima
not lgtm. found a bug https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc#newcode177 ui/gfx/image/image_skia.cc:177: float resource_scale = scale; ...
6 years, 7 months ago (2014-05-14 00:33:49 UTC) #37
Jun Mukai
https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc#newcode177 ui/gfx/image/image_skia.cc:177: float resource_scale = scale; On 2014/05/14 00:33:49, oshima wrote: ...
6 years, 7 months ago (2014-05-14 01:05:17 UTC) #38
oshima
https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc#newcode179 ui/gfx/image/image_skia.cc:179: if (g_supported_scales->back() <= scale) { On 2014/05/14 01:05:18, Jun ...
6 years, 7 months ago (2014-05-14 02:11:57 UTC) #39
Jun Mukai
https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc File ui/gfx/image/image_skia.cc (right): https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc#newcode179 ui/gfx/image/image_skia.cc:179: if (g_supported_scales->back() <= scale) { On 2014/05/14 02:11:57, oshima ...
6 years, 7 months ago (2014-05-14 05:08:41 UTC) #40
oshima
On 2014/05/14 05:08:41, Jun Mukai wrote: > https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc > File ui/gfx/image/image_skia.cc (right): > > https://codereview.chromium.org/263253003/diff/190001/ui/gfx/image/image_skia.cc#newcode179 ...
6 years, 7 months ago (2014-05-14 05:59:02 UTC) #41
Jun Mukai
On 2014/05/14 05:59:02, oshima wrote: > On 2014/05/14 05:08:41, Jun Mukai wrote: > > > ...
6 years, 7 months ago (2014-05-14 06:16:19 UTC) #42
oshima
On 2014/05/14 06:16:19, Jun Mukai wrote: > On 2014/05/14 05:59:02, oshima wrote: > > On ...
6 years, 7 months ago (2014-05-14 15:00:55 UTC) #43
Jun Mukai
TBR=jyasskin for the test change of chrome/browser/extensions/extension_icon_image_unittest.cc Confirmed with the original author (tbarzic) that this ...
6 years, 7 months ago (2014-05-15 01:06:17 UTC) #44
Jun Mukai
The CQ bit was checked by mukai@chromium.org
6 years, 7 months ago (2014-05-15 01:06:27 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/263253003/230001
6 years, 7 months ago (2014-05-15 01:08:16 UTC) #46
commit-bot: I haz the power
6 years, 7 months ago (2014-05-15 05:50:59 UTC) #47
Message was sent while issue was closed.
Change committed as 270582

Powered by Google App Engine
This is Rietveld 408576698