Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout flushes cause spurious WebGL buffer swaps, causing flickering #23924

Open
pcwalton opened this issue Aug 6, 2019 · 3 comments
Open

Layout flushes cause spurious WebGL buffer swaps, causing flickering #23924

pcwalton opened this issue Aug 6, 2019 · 3 comments

Comments

@pcwalton
Copy link
Contributor

pcwalton commented Aug 6, 2019

This is the cause of the flickering on https://mdn.github.io/webgl-examples/tutorial/sample4/.

The problem is that the call to clientWidth after the gl.clear call flushes layout, which causes a recomposite of a blank canvas.

My intuition is that if the ReflowGoal is Query then we should somehow communicate that to script so that it won't cause a buffer swap inside WebGLRenderingContext::layout_handle.

@jdm What would you like to do here?

@pcwalton
Copy link
Contributor Author

pcwalton commented Aug 7, 2019

Actually I'm now leaning toward building up a list of dirty image keys during display list building, and flushing them all at once right before sending the DL off to WebRender. This would effectively do the same thing, but would maintain separation of concerns better because layout_handle wouldn't have to care about the layout goal.

@jdm
Copy link
Member

jdm commented Aug 7, 2019

That sounds like a reasonable solution to me. Is this the wrong repo for this issue, though?

@pcwalton pcwalton transferred this issue from servo/webrender Aug 7, 2019
@pcwalton
Copy link
Contributor Author

pcwalton commented Aug 7, 2019

Yes, transferring the issue. Oops!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants