[Webkit-unassigned] [Bug 42273] Convolution computation causes bad alpha channel values
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jul 14 14:45:05 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=42273
--- Comment #6 from Alex Nicolaou <anicolao at chromium.org> 2010-07-14 14:45:04 PST ---
@Eric
All your comments are trivial to apply except this one:
| WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp:251
| + paintingData.dstPixelArray->set(pixel++, std::min(clampRGBAValue(totals[0] / m_divisor + paintingData.bias), alpha));
| Bah. This should be a function of some form. Copy/pasting 4 lines in a row is silly.
This just follows the pattern that was already in the code, including a side effect on pixel and the only change between lines being totals[0] -> 1, 2. I could make it prettier but it's not germane to the fix. Would you prefer:
paintingData.dstPixelArray->setPixel(pixel++, computeChannel(totals[0], alpha));
paintingData.dstPixelArray->setPixel(pixel++, computeChannel(totals[1], alpha));
paintingData.dstPixelArray->setPixel(pixel++, computeChannel(totals[2], alpha));
If that looks better it's trivial enough for me to put into this patch. If you'd like a bigger rearrange of the code can we put it on a follow up bug? Thanks for your feedback!
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list