Closed Bug 1594303 Opened 5 years ago Closed 5 years ago

Code clean up around RenderAndroidSurfaceTextureHostOGL

Categories

(Core :: Graphics: WebRender, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file)

RenderThread::PrepareForUse() hit an assertion failure on android.
https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=273962887&author=jnicol%40mozilla.com

It seems like a false alarm.

RenderThread::RegisterExternalImage() and RenderThread::UnregisterExternalImage() update mRenderTextures on calling thread(compositor thread). But RenderThread::PrepareForUse() and RenderThread::NotifyNotUsed() post a task to render thread and access mRenderTextures. There could be a race situation.

Assignee: nobody → sotaro.ikeda.g
Summary: Fix assert failure of RenderThread::PrepareForUse() → Fix assert failure of RenderThread::PrepareForUse() and RenderThread::NotifyNotUsed()

RenderThread::PrepareForUse() and RenderThread::NotifyNotUsed() are called only for SurfaceTextureHost. Then problen only happen on android.
https://searchfox.org/mozilla-central/source/gfx/layers/wr/WebRenderTextureHost.cpp#177

Blocks: 1590805
Summary: Fix assert failure of RenderThread::PrepareForUse() and RenderThread::NotifyNotUsed() → Fix RenderThread::PrepareForUse() and RenderThread::NotifyNotUsed()

The patch addressed the assertion failure. But RenderThread::PrepareForUse() still has a problem. In the STR of Bug 1593311 comment 0, there was a case that PrepareForUse() was called after NofityForUse(). PrepareForUse() should be called before NofityForUse().

NofityForUse() handling is delivered via wr::Checkpoint, but NofityForUse() is posted via Loop()->PostTask() since PrepareForUse() needs to be called at RenderAndroidSurfaceTextureHostOGL even when the texture host is not used by WR.

Blocks: 1593311
Attachment #9106806 - Attachment description: Bug 1594303 - Fix assert failure of RenderThread::PrepareForUse() and RenderThread::NotifyNotUsed() → Bug 1594303 - Fix RenderThread::PrepareForUse() and RenderThread::NotifyNotUsed()
Attachment #9106806 - Attachment description: Bug 1594303 - Fix RenderThread::PrepareForUse() and RenderThread::NotifyNotUsed() → Bug 1594303 - Code clean up around RenderAndroidSurfaceTextureHostOGL
Summary: Fix RenderThread::PrepareForUse() and RenderThread::NotifyNotUsed() → Code clean up around RenderAndroidSurfaceTextureHostOGL
Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fc30883fa2df Code clean up around RenderAndroidSurfaceTextureHostOGL r=jnicol
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Regressions: 1620458
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: