Closed Bug 1223486 Opened 8 years ago Closed 8 years ago

WrapTexCoord(-1.0) returns 1.0 instead of 0.0

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch Randall's patch (obsolete) — Splinter Review
While working on getting Fennec passing tests with the C++ APZ Randall found what appears to be a bug in WrapTexCoord. Specifically when called with a negative whole number it returns 1.0 instead of 0.0.

Patch attached, but after mxr'ing I see that there's another copy of this function in gfx/gl/DecomposeIntoNoRepeatTriangles.cpp which probably needs updating as well.

Also I'm not sure why the code uses fmodf when it could be doing |return v - floorf(v)| which I think returns the same thing.
Component: Graphics: Layers → Graphics
On IRC Bas gave an r+ to the floorf version that I suggested in comment 0, I'll steal this bug and update the patch.
Assignee: rbarker → bugmail.mozilla
Attached patch Patch v2Splinter Review
Updated patch, carrying r+ from Bas on IRC
Attachment #8686746 - Attachment is obsolete: true
Attachment #8686746 - Flags: review?(bas)
Attachment #8689562 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/1fdb5e461f10
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.