[Webkit-unassigned] [Bug 120346] [cairo] ShadowBlur is extremely slow when canvas's scale is very small.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 16 09:11:20 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=120346
Noam Rosenthal <noam at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #211396|review? |review-
Flag| |
--- Comment #12 from Noam Rosenthal <noam at webkit.org> 2013-10-16 09:10:05 PST ---
(From update of attachment 211396)
View in context: https://bugs.webkit.org/attachment.cgi?id=211396&action=review
This is a good catch, but the patch is hard to understand and needs to be a lot clearer.
> Source/WebCore/ChangeLog:11
> + ShadowBlur drawing is too slow if scale of canvas is set to very small value such as 0.01.
> + The main reason is blurRadius gets huge value if scale is small.
> + If shadow value is 100 with 0.01 scale value, blurRadius will be 10000.
> + Almost time is consumed to make blurred-layer.
This ChangeLog is written with poor English. Please improve.
Also though you're describing the problem, you're not at all describing the solution.
> Source/WebCore/platform/graphics/ShadowBlur.cpp:402
> + const AffineTransform transform = context->getCTM();
No need for const
> Source/WebCore/platform/graphics/ShadowBlur.cpp:403
> + if (m_shadowsIgnoreTransforms && !transform.isIdentity() && transform.xScale() < 1 && transform.yScale() < 1)
We should exit early on m_shadowsIgnoreTransforms before we get the CTM from the context.
> Source/WebCore/platform/graphics/ShadowBlur.cpp:420
> + if (scaledBlurLayer)
> + transform.scale(1 / transform.xScale(), 1 / transform.yScale());
What does this do? maybe a comment is in place? at least the changelog should describe this.
--
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