Qt5: constrain the window buffer refresh area

With this patch, the information about the changed window area is taken
into account when refreshing the Nitpicker buffer.

Fixes #1132.
This commit is contained in:
Christian Prochaska 2014-04-29 15:28:46 +02:00 committed by Christian Helmuth
parent 17c22b2ac9
commit 023afebba1
2 changed files with 10 additions and 4 deletions

View File

@ -491,7 +491,7 @@ unsigned char *QNitpickerPlatformWindow::framebuffer()
void QNitpickerPlatformWindow::refresh(int x, int y, int w, int h)
{
if (qnpw_verbose)
qDebug() << "QNitpickerPlatformWindow::refresh()";
qDebug("QNitpickerPlatformWindow::refresh(%d, %d, %d, %d)", x, y, w, h);
_framebuffer_session.refresh(x, y, w, h);
}

View File

@ -74,10 +74,16 @@ void QNitpickerWindowSurface::flush(QWindow *window, const QRegion &region, cons
Q_UNUSED(offset);
if (verbose)
qDebug() << "QNitpickerWindowSurface::flush()";
qDebug() << "QNitpickerWindowSurface::flush("
<< "window =" << window
<< ", region =" << region
<< ", offset =" << offset
<< ")";
QRect geo = _platform_window->geometry();
_platform_window->refresh(0, 0, geo.width(), geo.height());
_platform_window->refresh(region.boundingRect().x() + offset.x(),
region.boundingRect().y() + offset.y(),
region.boundingRect().width(),
region.boundingRect().height());
}
void QNitpickerWindowSurface::resize(const QSize &size, const QRegion &staticContents)