Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(206)

Issue 7447048: "Fix" case when bicubic filtering warps premultiplied color (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by robertphillips
Modified:
11 years, 4 months ago
CC:
skia-review_googlegroups.com, Humper
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

When the bicubicfilter test is altered as shown, the pre-multiplied color asserts in SkPackARGB32 fire. This happens when the following four colors are being filtered (in cubicBlend): c0 0x00000000 c1 0x00000000 c2 0xffffffff c3 0xff000000 yielding: a 0x00000012 r 0x00000013 g 0x00000013 b 0x00000013 The proposed fix is to just clamp the premultiplied alpha to be the max of the r,g,b components

Patch Set 1 #

Total comments: 2

Patch Set 2 : updated #

Patch Set 3 : paranoid check that nothing has changed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M src/effects/SkBicubicImageFilter.cpp View 1 2 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 11
robertphillips
11 years, 4 months ago (2013-03-04 20:14:16 UTC) #1
reed1
1. I suggest we make the new packer private for now, since this is the ...
11 years, 4 months ago (2013-03-04 20:16:44 UTC) #2
reed1
11 years, 4 months ago (2013-03-04 20:16:58 UTC) #3
robertphillips
Folding the clamp into the cubicBlend function works much better. The choice of making 'a' ...
11 years, 4 months ago (2013-03-04 20:46:50 UTC) #4
Stephen White
https://codereview.appspot.com/7447048/diff/1/gm/bicubicfilter.cpp File gm/bicubicfilter.cpp (right): https://codereview.appspot.com/7447048/diff/1/gm/bicubicfilter.cpp#newcode70 gm/bicubicfilter.cpp:70: // canvas->restore(); Note that this change will cause the ...
11 years, 4 months ago (2013-03-06 15:02:08 UTC) #5
robertphillips
https://codereview.appspot.com/7447048/diff/1/gm/bicubicfilter.cpp File gm/bicubicfilter.cpp (right): https://codereview.appspot.com/7447048/diff/1/gm/bicubicfilter.cpp#newcode70 gm/bicubicfilter.cpp:70: // canvas->restore(); I'm not proposing to deliver the changes ...
11 years, 4 months ago (2013-03-06 15:16:06 UTC) #6
robertphillips
ping
11 years, 4 months ago (2013-03-11 19:33:43 UTC) #7
reed1
lgtm, but seems like blanco needs to approve too.
11 years, 4 months ago (2013-03-11 20:09:43 UTC) #8
Stephen White
On 2013/03/11 20:09:43, reed1 wrote: > lgtm, but seems like blanco needs to approve too. ...
11 years, 4 months ago (2013-03-11 20:15:31 UTC) #9
Stephen White
On 2013/03/11 20:15:31, Stephen White wrote: > On 2013/03/11 20:09:43, reed1 wrote: > > lgtm, ...
11 years, 4 months ago (2013-03-11 20:35:38 UTC) #10
robertphillips
11 years, 4 months ago (2013-03-12 13:13:32 UTC) #11
Message was sent while issue was closed.
committed as r8096
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b