[webkit-reviews] review denied: [Bug 92059] [chromium] Combine color matrix filters and apply them in a single pass. : [Attachment 153949] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 24 06:49:12 PDT 2012


Stephen White <senorblanco at chromium.org> has denied  review:
Bug 92059: [chromium] Combine color matrix filters and apply them in a single
pass.
https://bugs.webkit.org/show_bug.cgi?id=92059

Attachment 153949: Patch
https://bugs.webkit.org/attachment.cgi?id=153949&action=review

------- Additional Comments from Stephen White <senorblanco at chromium.org>
As tempting as this optimization is (and I have been tempted), I don't think
it's correct for CSS filters.  The reason is that colour clamping must occur
after each matrix is applied.  E.g., if a translation by +255 followed by -255
were applied, it should end up at black, not at the original colour.

I'd suggest two possibilities:	add a flag so that it is only enabled for your
use case, and not CSS filters, or implement a generic colour matrix filter, and
convert and concatenate your matrices outside this code.  Alternately, I
suppose we could try to detect the case where clamping would occur, and avoid
the optimization, but that might be tricky.


More information about the webkit-reviews mailing list