[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
Thu Oct 17 00:35:26 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=120346





--- Comment #14 from Yonggeol Jung <yg48.jung at samsung.com>  2013-10-17 00:34:12 PST ---
(In reply to comment #12)
> (From update of attachment 211396 [details])
> 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.

Thanks for review.

> 
> > 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.

done.

> > Source/WebCore/platform/graphics/ShadowBlur.cpp:402
> > +    const AffineTransform transform = context->getCTM();
> 
> No need for const
> 

done.

> > 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.
> 

done.

> > 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.

Before drawing the shadows, the scale factor of context is 1.
So, the positions and sizes of rectangles should be calculated as considering the scale factor is 1. (I added comment.)

-- 
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