Closed Bug 739490 Opened 11 years ago Closed 11 years ago

Incorrect border painting on the edge of surfaces


(Core :: Graphics, defect)

Not set





(Reporter: mattwoodrow, Assigned: mattwoodrow)




(1 file, 1 obsolete file)

Attached patch Force invalidation (obsolete) — Splinter Review
When we attempt to paint a surface, with an nsDisplayBorder starting from the first pixel that *isn't* visible on the surface, we end up drawing single bit difference to the edge pixels of the surface.

Attached is an existing reftest, modified to invalidate that reproduces this on OSX with GL layers. Not sure what other platforms are affected by this, running tryserver builds now.

See for an example failure.

Try server:

This is affecting DLBI since changes to paint timing make this reftest (and others) fail, without the MozReftestInvalidate change.

Ideas here would be appreciated
Thinking about it, this might only fail on mac (opengl), even if it isn't necessarily limited to that.

It appears to be related to drawing around the edge of the surface, since modifying the test and removing the modifications to the last row of text moves the broken border painting up to the second to last line instead.

OpenGL layers are the only backend (I believe) that creates a separate surface for modifications and then uploads, other backend are drawing directly into the existing surface.
Should we work around it by giving the temporary surface a 1px extra margin?
This feels like pretty bad wallpapering :(

Fixes the bug though.
Attachment #609569 - Attachment is obsolete: true
Attachment #609603 - Flags: review?(roc)
Comment on attachment 609603 [details] [diff] [review]
Pad temporary surfaces with OpenGL layers on mac

Review of attachment 609603 [details] [diff] [review]:

Does the problem not occur on the top and left edges?
Attachment #609603 - Flags: review?(roc) → review+
BTW, please add a big comment explaining why you're adding 1 there!
> Does the problem not occur on the top and left edges?

It doesn't appear to, no.
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.