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

Angle's eglSwapBuffers doesn't use vsync, but only in the UWP app #25263

Closed
paulrouget opened this issue Dec 12, 2019 · 3 comments
Closed

Angle's eglSwapBuffers doesn't use vsync, but only in the UWP app #25263

paulrouget opened this issue Dec 12, 2019 · 3 comments

Comments

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Dec 12, 2019

On Windows, if I'm not mistaken, the Glutin port uses Angle. A swapbuffer take around ~15ms (good). In the UWP port, it takes < 1ms.

We expect swapbuffer to block, but it doesn't, eating all the CPU. Adding eglSwapInterval(mEglDisplay, 1) doesn't appear to help.

@jdm
Copy link
Member

@jdm jdm commented Dec 12, 2019

Is this something that changed recently, or just something you noticed for the first time? #25219 merged recently and included an ANGLE update.

@jdm
Copy link
Member

@jdm jdm commented Dec 12, 2019

On Windows, glutin only uses ANGLE if you run it the --angle argument.

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Dec 13, 2019

Ok - I was wrong. Buffer swapping happens at a proper frame rate.

What's going on though is that we wake up the event loop way too often, and the buffer are not swapping 99% of the time because there's nothing to redraw.

Because we set the animation state to Animating and the the embedder event loop assume a redraw + buffer swapping, it should not go faster than 60 FPS. But if it's set to animating, and no redraw happens, no buffer swapping happens, so no blocking, so loop going full speed.

Closing. I'll see what we can do about the buggy animating state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.