<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div dir="ltr" data-setdir="false">In a GLES app wired up to Weston/Wayland using EGL, we're calling `eglSwapBuffers` in a render loop that takes about 12-13ms to draw our content, based on CPU timing the run loop. However, the call to swap incurs a duration of around 20ms, meaning we're only hitting 30fps.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I've investigated a little bit into using the presentation callback protocol, but my understanding is that the EGL display (part of drm-wayland in the mesa source IIRC) is itself already plugged in to the necessary Wayland callbacks such that using `eglSwapBuffers` is sufficient to maximize available draw time.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I also tried enabling the profile flag in weston.ini that allows you to collect a trace, viewable in *wesgr*.  And I read Pekka's blog posts about these diagrams, but I still can't understand if our app is doing something suboptimally. I can't decipher what the wesgr diagram is saying.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">The other weston.ini knob I've tried is the `repaint` window, setting it to 12 or 13 to match our drawing loop. This seems to help sometimes but not in this case.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">A few questions:</div><div dir="ltr" data-setdir="false">  1. What other avenues of investigation should I pursue for the swap delay? As in, why when I take 12 ms to render do I not see about 4ms for the swap call to return? My display is running in at 60hz.</div><div dir="ltr" data-setdir="false">  2. Has EGL been optimized to use the available wayland callbacks and maximize available client drawing time?</div><div dir="ltr" data-setdir="false">  3. Does EGL lever<font size="3">age "<span style="color: rgb(29, 28, 29); orphans: 2; white-space: pre-wrap; widows: 2;">weston_direct_display_v1" when available? What's required to take advantage of it in the app code? (ie. run fullscreen?)</span></font></div><div dir="ltr" data-setdir="false"><font size="3"><span style="color: rgb(29, 28, 29); orphans: 2; white-space: pre-wrap; widows: 2;"><br></span></font></div><div dir="ltr" data-setdir="false"><font size="3"><span style="color: rgb(29, 28, 29); orphans: 2; white-space: pre-wrap; widows: 2;">Thanks!</span></font></div><div dir="ltr" data-setdir="false"><br></div></div></body></html>