MacOS build crash after merge from m-c

RESOLVED FIXED in mozilla54

Status

()

defect
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: ethlin, Assigned: ethlin)

Tracking

unspecified
mozilla54
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

After bug 1325227, ContentClientRemoteBuffer uses CrossProcessSemaphore to do the Readlock for texture, but there is no MacOS version CrossProcessSemaphore. For m-c, ClientPaintedLayer uses TiledContentClient on MacOS, for graphics, there is only ContentClientRemoteBuffer for now.
Matt, should I implement a MacOS CrossProcessSemaphore? It looks like MacOS doesn't support some semaphore functions.
Flags: needinfo?(matt.woodrow)
Yeah, if WR is going to use ContentClientRemote, then we probably need to.

I know that OSX doesn't support sem_timedwait using POSIX semaphores, but you could try mach semaphores, or the Grand Central Dispatch ones.

The other alternative is to support spin waiting using the other ReadLock impls (implement TryReadLock by doing a loop of GetReadCount and sleep until the timeout passes or GetReadCount == 0).
Flags: needinfo?(matt.woodrow)
It's easier to fix the problem by using ImageClient. And we won't use ContentClient in the future.
Attachment #8839403 - Flags: review?(sotaro.ikeda.g)
Comment on attachment 8839403 [details] [diff] [review]
replace ContentClient with ImageClient in WebRenderPaintedLayer

Review of attachment 8839403 [details] [diff] [review]:
-----------------------------------------------------------------

Review+, if a comment is applied. It might better to check reftest result.

::: gfx/layers/wr/WebRenderBridgeParent.cpp
@@ +356,5 @@
>          keysToDelete.push_back(key);
>          dSurf->Unmap();
>          // XXX workaround for releasing Readlock. See Bug 1339625
> +        if(host->GetType() == CompositableType::CONTENT_SINGLE ||
> +           host->GetType() == CompositableType::CONTENT_DOUBLE) {

This change is not necessary.
Attachment #8839403 - Flags: review?(sotaro.ikeda.g) → review+
(In reply to Sotaro Ikeda [:sotaro] from comment #4)
> Comment on attachment 8839403 [details] [diff] [review]
> replace ContentClient with ImageClient in WebRenderPaintedLayer
> 
> Review of attachment 8839403 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Review+, if a comment is applied. It might better to check reftest result.
> 
> ::: gfx/layers/wr/WebRenderBridgeParent.cpp
> @@ +356,5 @@
> >          keysToDelete.push_back(key);
> >          dSurf->Unmap();
> >          // XXX workaround for releasing Readlock. See Bug 1339625
> > +        if(host->GetType() == CompositableType::CONTENT_SINGLE ||
> > +           host->GetType() == CompositableType::CONTENT_DOUBLE) {
> 
> This change is not necessary.

okay, I'll remove it.

Based on [1] result, there is a failure 'layout/reftests/bugs/942672-1.html' with the patch. I'll mark it as 'fails-if'. 

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=1c9c7b65ab07a8d2c4f9d98cbd1d35ab304ff5e0&selectedJob=79001435
Pushed by ethlin@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/99999c5e6994
Using ImageClient for WebRenderPaintedLayer to prevent crash problem. r=sotaro
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Assignee: nobody → ethlin
You need to log in before you can comment on or make changes to this bug.