Skip to content

Commit

Permalink
x11: interop frame first to reduce interop+wait time
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Dec 29, 2015
1 parent a56136a commit 215814e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions widgets/X11Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,13 @@ void X11Renderer::drawFrame()
{
// TODO: interop
DPTR_D(X11Renderer);
if (!d.resizeXImage(d.current_index))
return;
if (preferredPixelFormat() != d.pixfmt) {
qDebug() << "x11 preferred pixel format: " << d.pixfmt;
setPreferredPixelFormat(d.pixfmt);
}

if (d.use_shm) {
int wait_count = 0;
while (d.ShmCompletionWaitCount >= kPoolSize) {
Expand All @@ -483,13 +490,6 @@ void X11Renderer::drawFrame()
usleep(1000);
}
}

if (!d.resizeXImage(d.current_index))
return;
if (preferredPixelFormat() != d.pixfmt) {
qDebug() << "x11 preferred pixel format: " << d.pixfmt;
setPreferredPixelFormat(d.pixfmt);
}
QRect roi = realROI();
XImage* ximage = d.ximage_pool[d.current_index];
if (d.use_shm) {
Expand Down

0 comments on commit 215814e

Please sign in to comment.