Closed
Bug 995410
Opened 10 years ago
Closed 10 years ago
reftest harness should call shouldSnapshotWholePage rather than testing for its existence
Categories
(Testing :: Reftest, defect, P1)
Testing
Reftest
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla31
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
Attachments
(2 files)
3.04 KB,
text/plain
|
Details | |
1.21 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
Robert O'Callahan wrote in bug 932233 comment #334: > We get into a loop of endless whole-canvas invalidation. With some logging > it shouldn't be that hard to figure out what causes that. > > This code doesn't look right: > http://dxr.mozilla.org/mozilla-central/source/layout/tools/reftest/reftest- > content.js#918 > if (shouldSnapshotWholePage) { > I think we should actually be calling that function instead of testing > whether it's defined :-) Robert O'Callahan wrote in bug 932233 comment #335: > That was added in bug 876626 by Matt. Matt, see previous comment ... are you > interested in fixing that? :-) > > With that fixed, we'll probably still have an infinite invalidation loop, > but we'd be able to see which rects are being invalidated which would help > narrow the problem down. I attached a patch in attachment 8405505 [details] [diff] [review], and did a try run: David Baron wrote in bug 932233 comment #340: > https://tbpl.mozilla.org/?tree=Try&rev=e6e7a335235e This try run shows we've regressed on at least some platforms (still waiting for full results).
Assignee | ||
Comment 1•10 years ago
|
||
The failures seem to be related to tests having a transparent backdrop instead of the white that was requested in the drawWindow calls.
Assignee | ||
Comment 2•10 years ago
|
||
Er, and on some platforms we just seem to be failing to offset the view into what we're painting -- in other words, a drawWindow that's not at (0,0) seems to be painting the stuff that is at (0, 0) at the location specified, rather than the stuff at that location.
Assignee | ||
Comment 3•10 years ago
|
||
So far the change I'm most suspicious of for having led to these failures is https://hg.mozilla.org/mozilla-central/rev/51dda2544c24 , but so far I'm mostly just guessing and haven't tested much.
Assignee | ||
Comment 4•10 years ago
|
||
I can repro the problem locally by changing this line: https://hg.mozilla.org/mozilla-central/file/6149db60c6cb/content/canvas/src/CanvasRenderingContext2D.cpp#l3640 to false, so I think that is indeed the problem.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → dbaron
Assignee | ||
Comment 5•10 years ago
|
||
I'm not sure I'm reproducing *all* the problem locally, though, but I've fixed the half that I could reproduce (OP_OVER instead of OP_SOURCE), and have a mochitest for it. I think there's a translation piece that I haven't reproduced yet, though.
Assignee | ||
Comment 6•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=62175d515bb4
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to David Baron [:dbaron] (needinfo? me) (UTC-7) from comment #5) > I'm not sure I'm reproducing *all* the problem locally, though, but I've > fixed the half that I could reproduce (OP_OVER instead of OP_SOURCE), and > have a mochitest for it. The OP_OVER patch (related to the condition from comment 4) did fix the failures on non-accelerated Windows (WinXP R, Win7/8 Ru), but didn't fix the Android and B2G failures. > I think there's a translation piece that I haven't > reproduced yet, though. mattwoodrow suggests maybe: [2014-04-11 22:03:20 -0700] <mattwoodrow> something to do with skia-gl (only enabled on android/b2g)
Assignee | ||
Comment 8•10 years ago
|
||
A try push to see if the failures still happen with the canvas backend switched from skia to cairo: https://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/0dc5940a187f/temp-canvas-no-skia https://tbpl.mozilla.org/?tree=Try&rev=0932e8e8205e
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to David Baron [:dbaron] (needinfo? me) (UTC-7) from comment #8) > A try push to see if the failures still happen with the canvas backend > switched from skia to cairo: > > https://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/0dc5940a187f/temp-canvas-no-skia > https://tbpl.mozilla.org/?tree=Try&rev=0932e8e8205e ... which shows the problem seems to be specific to skia canvas (and maybe skia-gl, since I can't repro locally on Linux by setting just the skia canvas pref).
Assignee | ||
Comment 10•10 years ago
|
||
And another test, with skia-backed but non-accelerated canvas: https://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/c0d50754a565/temp-canvas-no-accelerated https://tbpl.mozilla.org/?tree=Try&rev=3351816272b9
Assignee | ||
Comment 11•10 years ago
|
||
And also a run with a few more mochitests: https://tbpl.mozilla.org/?tree=Try&rev=984621b8580d
Assignee | ||
Comment 12•10 years ago
|
||
The try run in comment 10 says skia-gl canvas is not required (but skia canvas is, from comment 9). The try run in comment 11 says my mochitest still doesn't cover the problem.
Assignee | ||
Comment 13•10 years ago
|
||
I split the OP_SOURCE -> OP_OVER fix, and related tests, into bug 995661. The translation problem on Android and B2G still blocks enabling this, and I've given up (for now, anyway) on trying to get the B2G emulator to work. Maybe Matt can look into the translation issue?
Assignee: dbaron → nobody
Flags: needinfo?(matt.woodrow)
Assignee | ||
Comment 14•10 years ago
|
||
One more try push, actually: https://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/449b4cb3e3c6/test-patch-remove-translation https://tbpl.mozilla.org/?tree=Try&rev=c80645d57b55 to test to see if the failures are the same if I just remove the Translate call that appears not to be doing anything in the cases where things are going wrong.
Assignee | ||
Comment 15•10 years ago
|
||
At first glance, the failures look the same with that Translate call removed, so it seems like the problem is that that Translate call isn't working.
Assignee | ||
Comment 16•10 years ago
|
||
Since another thought occurred to me, on more try run, with a different test patch: https://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/6d1f033013c2/temp-canvas-no-skia https://tbpl.mozilla.org/?tree=Try&rev=5dab8fe955dd to see whether the skia canvas vs. cairo canvas difference is really just about which codepath is taken in CanvasRenderingContext2D::DrawWindow. (I suspect it is. If so, it seems worth testing if any other platforms have the same bug if forced through that codepath.)
Assignee | ||
Comment 17•10 years ago
|
||
So, indeed, the only reason the skia canvas backend is required is to trigger the codepath in DrawWindow that creates a new DrawTarget; if I force that codepath the failures still happen with the cairo canvas backend.
Assignee | ||
Comment 18•10 years ago
|
||
Oh, and the condition under which I can repro the translation problem locally is having OMTC enabled, which I hadn't done correctly before (though I thought I had).
Assignee | ||
Comment 19•10 years ago
|
||
The inverse translation happens to be living on the context when we blow it away here; removing the cairo_identity_matrix(mContext) call seems to fix the problem.
Flags: needinfo?(matt.woodrow)
Assignee | ||
Comment 20•10 years ago
|
||
I split the translation problem into bug 995721.
Assignee | ||
Comment 21•10 years ago
|
||
And a try run with that patch: https://tbpl.mozilla.org/?tree=Try&rev=e56757590f59
Assignee | ||
Comment 22•10 years ago
|
||
And a try run with a revised version of that patch: https://tbpl.mozilla.org/?tree=Try&rev=b605811c3f4b
Assignee | ||
Comment 23•10 years ago
|
||
And hopefully a final try run with all three bugs, and new mochitests: https://tbpl.mozilla.org/?tree=Try&rev=ef0b8637f70e
Assignee | ||
Comment 24•10 years ago
|
||
This is clearly what was intended when this code was introduced in bug 876626.
Attachment #8405929 -
Flags: review?(matt.woodrow)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Updated•10 years ago
|
Attachment #8405929 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 25•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/33d397b3b008
Comment 26•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/33d397b3b008
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•