WrapTexCoord(-1.0) returns 1.0 instead of 0.0

RESOLVED FIXED in Firefox 45

Status

()

Core
Graphics
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

unspecified
mozilla45
Points:
---

Firefox Tracking Flags

(firefox45 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Created attachment 8685541 [details] [diff] [review]
Randall's patch

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
Created attachment 8686746 [details] [diff] [review]
0001-Bug-1223486-WrapTexCoord-1.0-returns-1.0-instead-of-0.0-15111212-0c2648e.patch
Attachment #8685541 - Attachment is obsolete: true
Attachment #8686746 - Flags: review?(bas)
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
Created attachment 8689562 [details] [diff] [review]
Patch v2

Updated patch, carrying r+ from Bas on IRC
Attachment #8686746 - Attachment is obsolete: true
Attachment #8686746 - Flags: review?(bas)
Attachment #8689562 - Flags: review+

Comment 4

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/1fdb5e461f10

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/1fdb5e461f10
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox45: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.