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

Issue 2079413002: CreateButtonBackground() has been creating unpremultiplied bitmaps. (Closed)

Created:
4 years, 6 months ago by mtklein_C
Modified:
4 years, 4 months ago
Reviewers:
danakj, sky, reed1
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CreateButtonBackground() has been creating unpremultiplied bitmaps. This has been feeding unpremultiplied SkBitmaps into Skia as if they were premultiplied when drawing UI themes. The attached bug shows an example of how this can go wrong. It looks like this bug is ~7 years old. While reading the code, I noted down a couple questions worth thinking about if we want to tread into this code again. As it is, this should be enough to be able to revert the earlier bandaid CL I landed (see the bug). It should also let us start asserting that premultiplied pixels are well-formed, to prevent this sort of problem in the future. BUG=611002 Committed: https://crrev.com/220747df72f0024bb3438e350f2cef377367ef3d Cr-Commit-Position: refs/heads/master@{#408484}

Patch Set 1 #

Patch Set 2 : further note #

Total comments: 7

Patch Set 3 : update comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -4 lines) Patch
M ui/gfx/skbitmap_operations.cc View 1 2 3 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2079413002/1
4 years, 6 months ago (2016-06-20 18:37:53 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-20 19:32:36 UTC) #5
mtklein_C
4 years, 6 months ago (2016-06-20 20:07:36 UTC) #7
reed1
lgtm might augment the TODO comment about "just drawing", that the image would need to ...
4 years, 6 months ago (2016-06-20 20:11:47 UTC) #8
mtklein_C
On 2016/06/20 at 20:11:47, reed wrote: > lgtm > > might augment the TODO comment ...
4 years, 6 months ago (2016-06-21 17:30:37 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2079413002/20001
4 years, 6 months ago (2016-06-21 17:31:01 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-21 18:58:00 UTC) #13
mtklein_C
4 years, 6 months ago (2016-06-21 19:05:13 UTC) #15
danakj
+sky LGTM https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc File ui/gfx/skbitmap_operations.cc (right): https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc#newcode132 ui/gfx/skbitmap_operations.cc:132: // TODO: can we just do this ...
4 years, 6 months ago (2016-06-22 00:51:28 UTC) #17
sky
LGTM with a better comment. https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc File ui/gfx/skbitmap_operations.cc (right): https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc#newcode145 ui/gfx/skbitmap_operations.cc:145: // We premultiply bg ...
4 years, 6 months ago (2016-06-22 15:17:40 UTC) #18
mtklein_C
https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc File ui/gfx/skbitmap_operations.cc (right): https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc#newcode137 ui/gfx/skbitmap_operations.cc:137: // The math producing dst_row[x] below is a correct ...
4 years, 6 months ago (2016-06-22 15:19:41 UTC) #19
sky
https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc File ui/gfx/skbitmap_operations.cc (right): https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc#newcode137 ui/gfx/skbitmap_operations.cc:137: // The math producing dst_row[x] below is a correct ...
4 years, 6 months ago (2016-06-22 15:37:43 UTC) #20
mtklein_C
https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc File ui/gfx/skbitmap_operations.cc (right): https://codereview.chromium.org/2079413002/diff/20001/ui/gfx/skbitmap_operations.cc#newcode132 ui/gfx/skbitmap_operations.cc:132: // TODO: can we just do this with a ...
4 years, 4 months ago (2016-07-28 19:56:04 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2079413002/40001
4 years, 4 months ago (2016-07-28 19:56:33 UTC) #24
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-07-28 21:31:17 UTC) #26
commit-bot: I haz the power
4 years, 4 months ago (2016-07-28 21:32:59 UTC) #28
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/220747df72f0024bb3438e350f2cef377367ef3d
Cr-Commit-Position: refs/heads/master@{#408484}

Powered by Google App Engine
This is Rietveld 408576698