WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 85560
[chromium] CCMathUtil projectPoint needs to avoid divide-by-zero
https://bugs.webkit.org/show_bug.cgi?id=85560
Summary
[chromium] CCMathUtil projectPoint needs to avoid divide-by-zero
Shawn Singh
Reported
2012-05-03 17:40:39 PDT
I'm not sure if this is causing any known rendering artifacts / bugs, but of course it needs to be fixed anyway. When m33() is zero in projectPoint(), that implies the projection plane is parallel to the ray being traced, so it doesn't really project to any specific point on the plane. To my knowledge, its correct enough to just return any point in this case, as long as we don't divide by zero and cause Infs and NaNs for the rest of the code. I think this case only happens for layers that are not visible anyway (rotated perfectly so that they don't show up, or co-planar with the camera point).
Attachments
Patch
(5.80 KB, patch)
2012-05-07 10:07 PDT
,
Shawn Singh
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Shawn Singh
Comment 1
2012-05-07 10:07:26 PDT
Created
attachment 140543
[details]
Patch Please note, one unit test had to be updated so it does not fail due to the new divide-by-zero code. By a lucky fluke, it turned out that the test was still providing worthwhile coverage before this fix, but now it is even better
Adrienne Walker
Comment 2
2012-05-07 11:01:35 PDT
Comment on
attachment 140543
[details]
Patch Nice catch. R=me.
WebKit Review Bot
Comment 3
2012-05-07 11:47:24 PDT
Comment on
attachment 140543
[details]
Patch Clearing flags on attachment: 140543 Committed
r116332
: <
http://trac.webkit.org/changeset/116332
>
WebKit Review Bot
Comment 4
2012-05-07 11:47:33 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.
Top of Page
Format For Printing
XML
Clone This Bug