forked from upstream/UXP-mirror
gpu compositor: a given-up frame writes nothing; test switches for an EGL failure and a stalled job
A compose job the daemon forgets (its bound passed, or the GPU path given up) is marked cancelled: the compositor composes nothing more for it and writes nothing into its destination, a shared slot the software path may be painting by then. Two device-test switches: JIHAD_GPU_TEST_NO_EGL=1 gives the compositor no GL context, as an EGL failure would; JIHAD_GPU_TEST_STALL=<n> holds the compositor thread 6 s on the nth job, as a GPU wait that does not return would.
This commit is contained in:
1 parent
3b3430dd03
commit
f676e50ea4
4 files changed
+34
-4
No files matched your search
@@ -1015,7 +1015,7 @@ PuppetWidget::JihadComposePoll(uint32_t aToken, bool aWait, int* aOut, bool* aSc
|
||||
if (aOut) { aOut[0] = job->req.invLo; aOut[1] = job->req.invHi; aOut[8] = job->req.frameY; aOut[9] = job->req.frameYValid ? 1 : 0; }
|
||||
return 2;
|
||||
} else if (aWait) {
|
||||
job->abandoned = true;
|
||||
job->abandoned = true; job->req.cancelled = true;
|
||||
fprintf(stderr, "[jihad-gpu] compose: no answer from the compositor thread in 3 s\n");
|
||||
}
|
||||
}
|
||||
@@ -1043,7 +1043,7 @@ PuppetWidget::JihadComposeForget(uint32_t aToken)
|
||||
{
|
||||
mozilla::MonitorAutoLock lock(job->mon);
|
||||
done = job->done;
|
||||
if (!done) job->abandoned = true;
|
||||
if (!done) job->abandoned = true; job->req.cancelled = true;
|
||||
}
|
||||
mJihadJobs.erase(mJihadJobs.begin() + i);
|
||||
if (done) delete job;
|
||||
@@ -1060,7 +1060,7 @@ PuppetWidget::JihadComposeAbandonAll()
|
||||
{
|
||||
mozilla::MonitorAutoLock lock(job->mon);
|
||||
done = job->done;
|
||||
if (!done) job->abandoned = true;
|
||||
if (!done) job->abandoned = true; job->req.cancelled = true;
|
||||
}
|
||||
if (done) delete job;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user