Last Comment Bug 739490 - Incorrect border painting on the edge of surfaces
: Incorrect border painting on the edge of surfaces
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla15
Assigned To: Matt Woodrow (:mattwoodrow)
:
Mentors:
Depends on:
Blocks: dlbi
  Show dependency treegraph
 
Reported: 2012-03-26 18:14 PDT by Matt Woodrow (:mattwoodrow)
Modified: 2012-04-27 06:53 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Force invalidation (1.48 KB, patch)
2012-03-26 18:14 PDT, Matt Woodrow (:mattwoodrow)
no flags Details | Diff | Splinter Review
Pad temporary surfaces with OpenGL layers on mac (4.15 KB, patch)
2012-03-26 20:57 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Splinter Review

Description Matt Woodrow (:mattwoodrow) 2012-03-26 18:14:07 PDT
Created attachment 609569 [details] [diff] [review]
Force invalidation

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 https://tbpl.mozilla.org/php/getParsedLog.php?id=10379707&tree=Try&full=1 for an example failure.

Try server: https://tbpl.mozilla.org/?tree=Try&pusher=mwoodrow@mozilla.com

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

Ideas here would be appreciated
Comment 1 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-03-26 18:35:51 PDT
Odd. This is Mac-only?
Comment 2 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-03-26 18:36:16 PDT
Oh, you said in comment #0 you don't know yet.
Comment 3 Matt Woodrow (:mattwoodrow) 2012-03-26 18:54:36 PDT
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.
Comment 4 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-03-26 19:06:14 PDT
Should we work around it by giving the temporary surface a 1px extra margin?
Comment 5 Matt Woodrow (:mattwoodrow) 2012-03-26 20:57:36 PDT
Created attachment 609603 [details] [diff] [review]
Pad temporary surfaces with OpenGL layers on mac

This feels like pretty bad wallpapering :(

Fixes the bug though.
Comment 6 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-03-26 21:00:11 PDT
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?
Comment 7 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-03-26 21:00:47 PDT
BTW, please add a big comment explaining why you're adding 1 there!
Comment 8 Matt Woodrow (:mattwoodrow) 2012-03-27 09:36:18 PDT
> Does the problem not occur on the top and left edges?

It doesn't appear to, no.
Comment 9 Matt Woodrow (:mattwoodrow) 2012-04-26 17:25:42 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/2841b49cfb16
Comment 10 :Ms2ger (⌚ UTC+1/+2) 2012-04-27 06:53:01 PDT
https://hg.mozilla.org/mozilla-central/rev/2841b49cfb16

Note You need to log in before you can comment on or make changes to this bug.