[Webkit-unassigned] [Bug 38851] Large SVG rect with shadow fails to render

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 30 23:38:40 PDT 2010


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





--- Comment #14 from Rob Buis <rwlbuis at gmail.com>  2010-05-30 23:38:40 PST ---
Hello Niko,

(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > Created an attachment (id=57415)
 --> (https://bugs.webkit.org/attachment.cgi?id=57415) [details] [details] [details]
> > > Patch
> > 
> > This patch causes no regressions in the svg test results, so I didnt upload any changed results.
> > Cheers,
> 
> Hey Rob,
> 
> this patch still puzzles me. I don't know why we actually have to clamp to intmax??
> If we just get rid of any intermediate integers, we can use floatmax no?
> 
> Just a quick test:
> float floatMin = std::numeric_limits<float>::min();
> float floatMax = std::numeric_limits<float>::max();
> std::cout << "FLOAT min=" << floatMin << " max=" << floatMax << std::endl;
> 
> int intMin = std::numeric_limits<int>::min();
> int intMax = std::numeric_limits<int>::max();
> std::cout << "  INT min=" << intMin << " max=" << intMax << std::endl;
> 
> Result:
> FLOAT min=1.17549e-38 max=3.40282e+38
>   INT min=-2147483648 max=2147483647
> 
> 
> If you just store shadowLeft/shadowRight and shadowBottom/shadowTop in float values (changing getSVGShadowExtent to operator on floats, not integers), then following code should just work, no?
> 
> repaintRect.move(shadowLeft, shadowRight);

You mean repaintRect.move(shadowLeft, shadowTop) here :)

> repaintRect.setSize(repaintRect.size() + FloatSize(shadowRight - shadowLeft, shadowBottom - shadowTop));
> 
> That would remove the need for the intermediate overflow* values, and we wouldn't need to clamp to just integer range, which sounds wrong to me.

All the trickery in the patch was only needed to prevent any changed results. Using all floats works as well, but causes 6/7 changed results. All seem to be small, with topmost 2 pixels changed per result. I can make a patch for that, and in fact was almost done, but got some message about pixel hash changed even though pixel result was correct, which I did not really understand. Let me know what you think.
Cheers,

Rob.

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