[Webkit-unassigned] [Bug 73040] FloatRect::isRectilinear() returns false for 180degree rotations

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 23 12:42:20 PST 2011


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





--- Comment #2 from David Reveman <reveman at chromium.org>  2011-11-23 12:42:21 PST ---
(From update of attachment 116392)
View in context: https://bugs.webkit.org/attachment.cgi?id=116392&action=review

Good catch! This will also increase the number of cases where we can avoid the anti-aliasing shader.

> Source/WebCore/platform/graphics/FloatQuad.cpp:90
> +    return a - b < 0.00000000000001 && a - b > -0.00000000000001;

I'd put that magic value in a constant:
const float epsilon = 0.00000000000001;
that's enough to make sure there's no confusion about its use. Maybe it also doesn't have to be that small? It just has to be small enough to not affect rendering, right? We have to make a similar check in CCTiledLayerImpl::drawTiles. I used 1 / 1024 there.

and maybe "return fabs(a - b) < epsilon" would be cleaner?

> Source/WebCore/platform/graphics/FloatQuad.cpp:93
>  bool FloatQuad::isRectilinear() const

Maybe it's a bad idea to do this approximation in isRectilinear(). How about adding a FloatQuad::isCloseToRectilinear()?

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