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

Issue 16977007: Only load theme images for the scale factors that use them (Closed)

Created:
7 years, 6 months ago by sschmitz
Modified:
7 years, 6 months ago
Reviewers:
pkotwicz
CC:
chromium-reviews
Visibility:
Public.

Description

Only load theme images for the scale factors that use them This CL implements delayed decoding of PNG data for some theme images and delayed scaling for other scale factors until needed. Created new child of ImageSkiaSource in BrowserThemePack for this purpose. BUG=243831 R=pkotwicz@chromium.org TEST=manual out/Debug/unit_tests --gtest_filter='BrowserThemePackTest.HiDpiThemeTest' Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207727

Patch Set 1 #

Total comments: 1

Patch Set 2 : delay GetRawMemory #

Total comments: 24

Patch Set 3 : review #

Patch Set 4 : store png in source #

Total comments: 12

Patch Set 5 : add unit test #

Patch Set 6 : combine unit tests #

Total comments: 1

Patch Set 7 : revert unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -56 lines) Patch
M chrome/browser/themes/browser_theme_pack.cc View 1 2 3 4 6 chunks +134 lines, -56 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
sschmitz
7 years, 6 months ago (2013-06-14 14:51:58 UTC) #1
pkotwicz
Comment on the bug when you want a review :)
7 years, 6 months ago (2013-06-14 15:04:03 UTC) #2
pkotwicz
I realized that comment #2 is misleading. Comment on the CL when you want a ...
7 years, 6 months ago (2013-06-14 15:17:05 UTC) #3
sschmitz
On 2013/06/14 15:17:05, pkotwicz wrote: > I realized that comment #2 is misleading. Comment on ...
7 years, 6 months ago (2013-06-14 15:27:53 UTC) #4
pkotwicz
Looks pretty good. Please ping me if you want my (maybe wrong) opinion on different ...
7 years, 6 months ago (2013-06-14 18:23:05 UTC) #5
pkotwicz
To be more specific, you should be able to use ImageSkia::ImageSkia(ImageSkiaSource* source, ui::SCALE_FACTOR_100P) in BrowserThemePack::GetImageNamed()
7 years, 6 months ago (2013-06-14 18:32:20 UTC) #6
sschmitz
7 years, 6 months ago (2013-06-17 23:54:13 UTC) #7
pkotwicz
LGTM with nits https://codereview.chromium.org/16977007/diff/11001/chrome/browser/themes/browser_theme_pack.cc File chrome/browser/themes/browser_theme_pack.cc (right): https://codereview.chromium.org/16977007/diff/11001/chrome/browser/themes/browser_theme_pack.cc#newcode483 chrome/browser/themes/browser_theme_pack.cc:483: // An ImageSkiaSouce that delays decoding ...
7 years, 6 months ago (2013-06-18 15:23:43 UTC) #8
sschmitz
Thanks for your quick and excellent review. I implemented all suggested changes. However, (as I ...
7 years, 6 months ago (2013-06-18 18:20:29 UTC) #9
pkotwicz
After some thought, I do not think there is an easy way of avoiding storing ...
7 years, 6 months ago (2013-06-18 20:48:50 UTC) #10
sschmitz
ok... png_map_ inside the source is back.
7 years, 6 months ago (2013-06-19 00:05:03 UTC) #11
pkotwicz
LGTM https://codereview.chromium.org/16977007/diff/21001/chrome/browser/themes/browser_theme_pack.cc File chrome/browser/themes/browser_theme_pack.cc (right): https://codereview.chromium.org/16977007/diff/21001/chrome/browser/themes/browser_theme_pack.cc#newcode446 chrome/browser/themes/browser_theme_pack.cc:446: Nit: Add a comment for this method https://codereview.chromium.org/16977007/diff/21001/chrome/browser/themes/browser_theme_pack.cc#newcode447 ...
7 years, 6 months ago (2013-06-19 16:20:32 UTC) #12
pkotwicz
https://codereview.chromium.org/16977007/diff/21001/chrome/browser/themes/browser_theme_pack.cc File chrome/browser/themes/browser_theme_pack.cc (right): https://codereview.chromium.org/16977007/diff/21001/chrome/browser/themes/browser_theme_pack.cc#newcode555 chrome/browser/themes/browser_theme_pack.cc:555: Shouldn't you check if there is already a bitmap ...
7 years, 6 months ago (2013-06-19 16:23:27 UTC) #13
sschmitz
Implemented review and added a unit test. The unit test is disabled until the test ...
7 years, 6 months ago (2013-06-19 21:56:52 UTC) #14
sschmitz
Combined the two unit test. Once the needed image data (binary) lands, I will uncomment ...
7 years, 6 months ago (2013-06-20 00:16:44 UTC) #15
pkotwicz
https://codereview.chromium.org/16977007/diff/39001/chrome/browser/themes/browser_theme_pack.cc File chrome/browser/themes/browser_theme_pack.cc (right): https://codereview.chromium.org/16977007/diff/39001/chrome/browser/themes/browser_theme_pack.cc#newcode531 chrome/browser/themes/browser_theme_pack.cc:531: return gfx::ImageSkiaRep(bitmap, scale_factor); After reading through the unittests, I ...
7 years, 6 months ago (2013-06-20 02:00:23 UTC) #16
pkotwicz
Also, I believe that you are missing the modified json file in this CL
7 years, 6 months ago (2013-06-20 14:16:05 UTC) #17
sschmitz
On 2013/06/20 02:00:23, pkotwicz wrote: > https://codereview.chromium.org/16977007/diff/39001/chrome/browser/themes/browser_theme_pack.cc > File chrome/browser/themes/browser_theme_pack.cc (right): > > https://codereview.chromium.org/16977007/diff/39001/chrome/browser/themes/browser_theme_pack.cc#newcode531 > ...
7 years, 6 months ago (2013-06-20 14:19:18 UTC) #18
sschmitz
On 2013/06/20 14:16:05, pkotwicz wrote: > Also, I believe that you are missing the modified ...
7 years, 6 months ago (2013-06-20 14:21:40 UTC) #19
sschmitz
On 2013/06/20 14:21:40, sschmitz wrote: > On 2013/06/20 14:16:05, pkotwicz wrote: > > Also, I ...
7 years, 6 months ago (2013-06-20 20:44:29 UTC) #20
sschmitz
reverted the unit test.
7 years, 6 months ago (2013-06-20 20:49:18 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sschmitz@chromium.org/16977007/53001
7 years, 6 months ago (2013-06-20 22:09:04 UTC) #22
commit-bot: I haz the power
7 years, 6 months ago (2013-06-21 06:07:55 UTC) #23
Message was sent while issue was closed.
Change committed as 207727

Powered by Google App Engine
This is Rietveld 408576698