RESOLVED FIXED42300
Canvas: Don't add shadow rect to dirty region when shadow alpha is 0
https://bugs.webkit.org/show_bug.cgi?id=42300
Summary Canvas: Don't add shadow rect to dirty region when shadow alpha is 0
Andreas Kling
Reported 2010-07-14 16:05:04 PDT
CanvasRenderingContext2D::willDraw() will always add the current shadow rect to the dirty region. We can skip this if the current shadow color has a zero alpha value.
Attachments
Proposed patch (1.22 KB, patch)
2010-07-14 16:06 PDT, Andreas Kling
no flags
Andreas Kling
Comment 1 2010-07-14 16:06:14 PDT
Created attachment 61578 [details] Proposed patch
Darin Adler
Comment 2 2010-07-14 16:14:27 PDT
Comment on attachment 61578 [details] Proposed patch It’s unfortunate we have to construct a Color just to check the alpha channel. That’s going to cost some actual instructions and CPU time. Maybe we should have more functions that operate directly on RGBA32 values.
Andreas Kling
Comment 3 2010-07-14 16:25:22 PDT
(In reply to comment #2) > (From update of attachment 61578 [details]) > It’s unfortunate we have to construct a Color just to check the alpha channel. That’s going to cost some actual instructions and CPU time. Maybe we should have more functions that operate directly on RGBA32 values. Agreed. Coming soon in a separate patch.
Andreas Kling
Comment 4 2010-07-14 16:28:06 PDT
Comment on attachment 61578 [details] Proposed patch Clearing flags on attachment: 61578 Committed r63370: <http://trac.webkit.org/changeset/63370>
Andreas Kling
Comment 5 2010-07-14 16:28:16 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.