On Fri, Aug 18, 2023 at 8:18 PM Eduardo Hopperdietzel <ehopperdiet...@gmail.com> wrote: > > Hi David, > > That's a very good point I hadn't thought about. I will create a testing > Wayland client benchmark and measure the time it takes for QPainer to perform > different drawing operations using both SHM and DMA. I'll also test buffer > resizing and measure the overall (client/compositor) performance by counting > the number of frame callbacks (FPS) returned by different compositors. > > To ensure the benchmark provides a representative performance evaluation for > Qt, I would appreciate it if you could clarify the following doubts: > > 1. Does Qt respect the wl_surface frame callbacks sent by the compositor, or > does it simply draw as many frames as it can?
Yes to both :) If you use the normal loop of QWidget::update you'll get the paintEvent each callback If you use QWidget::repaint (which docs err against using) you'll blast out loads of frames then block when you hit some hardcoded limit which will block till we get buffers released. > 2. When using SHM, does Qt reuse the same buffer on a wl_surface if it > receives a wl_buffer release event before a wl_surface frame callback? And > does it use more than one otherwise? There is a pool that is re-used. It's double buffered at a minimum but scales to handle the repaint case above. > 3. If DMA was implemented, I suppose double buffering would be mandatory, or > should I consider triple buffering or more? The logic would be the same. David -- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development