bool QQnxRasterBackingStore::scroll(const QRegion &area, int dx, int dy) { qRasterBackingStoreDebug() << Q_FUNC_INFO << "w =" << window(); // calculate entire region affected by scroll operation (src + dst) QRegion totalArea = area.translated(dx, dy); totalArea += area; m_hasUnflushedPaintOperations = true; // visit all pending scroll operations for (int i = m_scrollOpList.size() - 1; i >= 0; i--) { ScrollOp &op = m_scrollOpList[i]; if (op.totalArea == totalArea) { // same area is being scrolled again - update delta op.dx += dx; op.dy += dy; return true; } else if (op.totalArea.intersects(totalArea)) { // current scroll overlaps previous scroll but is // not equal in area - just paint everything qWarning("QQNX: pending scroll operations overlap but not equal"); return false; } } // create new scroll operation m_scrollOpList.append( ScrollOp(totalArea, dx, dy) ); return true; }
bool QBBRasterWindowSurface::scroll(const QRegion &area, int dx, int dy) { #if defined(QBBRASTERWINDOWSURFACE_DEBUG) qDebug() << "QBBRasterWindowSurface::scroll - w=" << window(); #endif // calculate entire region affected by scroll operation (src + dst) QRegion totalArea = area.translated(dx, dy); totalArea += area; // visit all pending scroll operations for (int i = mScrollOpList.size() - 1; i >= 0; i--) { ScrollOp& op = mScrollOpList[i]; if (op.totalArea == totalArea) { // same area is being scrolled again - update delta op.dx += dx; op.dy += dy; return true; } else if (op.totalArea.intersects(totalArea)) { // current scroll overlaps previous scroll but is // not equal in area - just paint everything qWarning("QBB: pending scroll operations overlap but not equal"); return false; } } // create new scroll operation mScrollOpList.append( ScrollOp(totalArea, dx, dy) ); return true; }