summaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@theqtcompany.com>2016-04-28 10:24:38 -0700
committerLouai Al-Khanji <louai.al-khanji@qt.io>2016-04-29 16:09:14 +0000
commita1fd5d02bd9d5efb4334dc6f9d393eaaaa377bab (patch)
tree0029c51880855b0e5e028eec53dd194f8b52d022 /src/android
parentcd1eff1e1ef3097e5dd1a01f88eb1052ee63022d (diff)
xcb: support nested paint operations in remote scenarios
Recent changes to the xcb platform plugin added logic to paint to a server-side X Pixmap when the MIT-SHM extension is unavailable. Those changes also added logic to keep track of the dirty areas that need to be flushed to the server from the backing store when the backing store is flushed to a window. Because a single QRegion was used to track those areas, nested paint operations no longer accurately tracked all the dirty areas. Consider: void Widget::paintEvent(QPaintEvent *) { QPainter p1(this); for (int i = 0; longRunningOperationInProgress(); i++) { QPixmap pixmap(size()); QPainter p2(&pixmap); p2.drawText(pixmap.rect(), i & 1 ? "Working." : "Working.."); p2.end(); QBackingStore *bs = backingStore(); bs->beginPaint(rect()); p1.drawPixmap(0, 0, pixmap); bs->endPaint(); bs->flush(rect(), windowHandle()); } p1.fillRect(rect(), Qt::red); p1.drawText(rect(), "Done!"); } While this code could be restructured, it is a common pattern in legacy Qt applications which cannot be easily changed. Change-Id: I3b919266abe41c96a584cb02f41cafac3f9d1d7c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/android')
0 files changed, 0 insertions, 0 deletions