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

Issue 122923003: DM: fix failures when using -r by comparing unpremultiplied. (Closed)

Created:
6 years, 11 months ago by mtklein
Modified:
6 years, 11 months ago
Reviewers:
bsalomon
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

DM: fix failures when using -r by comparing unpremultiplied. PNGs store unpremultiplied colors, so we have to convert back and forth with SkBitmap. This is lossy. GM solves this problem by stripping the alpha channel before writing the PNG. This flips it around, converting the GM's output to unpremultiplied as needed. This way each pixel goes from premul to unpremul once, never back. Tested: out/Release/dm -w /tmp/w --config 565 8888 gpu out/Release/dm -r /tmp/w --config 565 8888 gpu BUG= Committed: http://code.google.com/p/skia/source/detail?r=12926

Patch Set 1 #

Patch Set 2 : Compare unpremultiplied when reading PNG. #

Total comments: 1

Patch Set 3 : Use SkColorType. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -10 lines) Patch
M dm/DMWriteTask.cpp View 1 2 2 chunks +52 lines, -10 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
mtklein
6 years, 11 months ago (2014-01-04 04:27:07 UTC) #1
bsalomon
On 2014/01/04 04:27:07, mtklein wrote: Hmm... I think this may not work when comparing PNGs ...
6 years, 11 months ago (2014-01-06 14:22:06 UTC) #2
mtklein
On 2014/01/06 14:22:06, bsalomon wrote: > On 2014/01/04 04:27:07, mtklein wrote: > > Hmm... I ...
6 years, 11 months ago (2014-01-06 15:48:28 UTC) #3
mtklein
On 2014/01/06 15:48:28, mtklein wrote: > On 2014/01/06 14:22:06, bsalomon wrote: > > On 2014/01/04 ...
6 years, 11 months ago (2014-01-06 15:54:07 UTC) #4
epoger
Mike- As you've noted, GM strips the alpha channel before writing the PNG. So it ...
6 years, 11 months ago (2014-01-06 17:13:27 UTC) #5
mtklein
On 2014/01/06 17:13:27, epoger wrote: > Mike- > > As you've noted, GM strips the ...
6 years, 11 months ago (2014-01-06 17:17:45 UTC) #6
mtklein
On 2014/01/06 17:17:45, mtklein wrote: > On 2014/01/06 17:13:27, epoger wrote: > > Mike- > ...
6 years, 11 months ago (2014-01-06 17:24:03 UTC) #7
epoger
On 2014/01/06 17:17:45, mtklein wrote: > This problem happens in GM only when using IndividualImagesExpectataionsSource, ...
6 years, 11 months ago (2014-01-06 17:24:18 UTC) #8
bsalomon
https://codereview.chromium.org/122923003/diff/100001/dm/DMWriteTask.cpp File dm/DMWriteTask.cpp (right): https://codereview.chromium.org/122923003/diff/100001/dm/DMWriteTask.cpp#newcode134 dm/DMWriteTask.cpp:134: if (bitmap.config() == SkBitmap::kARGB_8888_Config) { Can we look at ...
6 years, 11 months ago (2014-01-06 18:46:43 UTC) #9
mtklein
On 2014/01/06 18:46:43, bsalomon wrote: > https://codereview.chromium.org/122923003/diff/100001/dm/DMWriteTask.cpp > File dm/DMWriteTask.cpp (right): > > https://codereview.chromium.org/122923003/diff/100001/dm/DMWriteTask.cpp#newcode134 > ...
6 years, 11 months ago (2014-01-06 18:54:06 UTC) #10
mtklein
On 2014/01/06 18:54:06, mtklein wrote: > On 2014/01/06 18:46:43, bsalomon wrote: > > https://codereview.chromium.org/122923003/diff/100001/dm/DMWriteTask.cpp > ...
6 years, 11 months ago (2014-01-06 19:07:02 UTC) #11
bsalomon
On 2014/01/06 19:07:02, mtklein wrote: > On 2014/01/06 18:54:06, mtklein wrote: > > On 2014/01/06 ...
6 years, 11 months ago (2014-01-06 19:08:18 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@google.com/122923003/160001
6 years, 11 months ago (2014-01-06 19:39:56 UTC) #13
commit-bot: I haz the power
6 years, 11 months ago (2014-01-06 20:24:23 UTC) #14
Message was sent while issue was closed.
Change committed as 12926

Powered by Google App Engine
This is Rietveld 408576698