Closed Bug 1279611 Opened 3 years ago Closed 3 years ago

Document and test the fact that SurfacePipe::WriteEmptyRow() overwrites the entire row

Categories

(Core :: ImageLib, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: seth, Assigned: seth)

References

Details

Attachments

(1 file)

The current code doesn't make it particularly obvious that if you write some pixels to a row and then call SurfacePipe::WriteEmptyRow(), the pixels you wrote earlier get overwritten.

We could avoid this behavior by checking if |SurfacePipe::mCol| is nonzero and if so just filling to the end of the row, but honestly I think it's fine as long as it's documented and tested. (And I think the way it works now makes the name less misleading.) The important thing is that it doesn't come as a surprise.
Blocks: 1279117
Attachment #8762165 - Flags: review?(n.nethercote) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/78f55d79c3e04e9781ee58228a21c19d9a0f59f9
Bug 1279611 - Document and test the fact that SurfacePipe::WriteEmptyRow() overwrites the entire row. r=njn
https://hg.mozilla.org/mozilla-central/rev/78f55d79c3e0
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.