Changeset View
Changeset View
Standalone View
Standalone View
scene_opengl.cpp
Context not available. | |||||
620 | void SceneOpenGL::copyPixels(const QRegion ®ion) | 620 | void SceneOpenGL::copyPixels(const QRegion ®ion) | ||
---|---|---|---|---|---|
621 | { | 621 | { | ||
622 | const int height = screens()->size().height(); | 622 | const int height = screens()->size().height(); | ||
623 | foreach (const QRect &r, region.rects()) { | 623 | const QVector<QRect> rects = region.rects(); | ||
624 | for (const QRect &r : rects) { | ||||
624 | const int x0 = r.x(); | 625 | const int x0 = r.x(); | ||
625 | const int y0 = height - r.y() - r.height(); | 626 | const int y0 = height - r.y() - r.height(); | ||
626 | const int x1 = r.x() + r.width(); | 627 | const int x1 = r.x() + r.width(); | ||
Context not available. | |||||
833 | // movie aspect - two times ;-) It's a Fox format, though, so maybe we want to restrict | 834 | // movie aspect - two times ;-) It's a Fox format, though, so maybe we want to restrict | ||
834 | // to 2.20:1 - Panavision - which has actually been used for interesting movies ...) | 835 | // to 2.20:1 - Panavision - which has actually been used for interesting movies ...) | ||
835 | // would be 57% of 5/4 | 836 | // would be 57% of 5/4 | ||
836 | foreach (const QRect &r, region.rects()) { | 837 | const QVector<QRect> rects = region.rects(); | ||
838 | for (const QRect &r : rects) { | ||||
837 | // damagedPixels += r.width() * r.height(); // combined window damage test | 839 | // damagedPixels += r.width() * r.height(); // combined window damage test | ||
838 | damagedPixels = r.width() * r.height(); // experimental single window damage testing | 840 | damagedPixels = r.width() * r.height(); // experimental single window damage testing | ||
839 | if (damagedPixels > fullRepaintLimit) { | 841 | if (damagedPixels > fullRepaintLimit) { | ||
Context not available. | |||||
1268 | 1270 | | |||
1269 | const QRegion filterRegion = region.translated(-x(), -y()); | 1271 | const QRegion filterRegion = region.translated(-x(), -y()); | ||
1270 | // split all quads in bounding rect with the actual rects in the region | 1272 | // split all quads in bounding rect with the actual rects in the region | ||
1271 | foreach (const WindowQuad &quad, data.quads) { | 1273 | for (const WindowQuad &quad : qAsConst(data.quads)) { | ||
1272 | foreach (const QRect &r, filterRegion.rects()) { | 1274 | const QVector<QRect> rects = filterRegion.rects(); | ||
1275 | for (const QRect &r: rects) { | ||||
1273 | const QRectF rf(r); | 1276 | const QRectF rf(r); | ||
1274 | const QRectF quadRect(QPointF(quad.left(), quad.top()), QPointF(quad.right(), quad.bottom())); | 1277 | const QRectF quadRect(QPointF(quad.left(), quad.top()), QPointF(quad.right(), quad.bottom())); | ||
1275 | const QRectF &intersected = rf.intersected(quadRect); | 1278 | const QRectF &intersected = rf.intersected(quadRect); | ||
Context not available. | |||||
1508 | WindowQuadList quads[LeafCount]; | 1511 | WindowQuadList quads[LeafCount]; | ||
1509 | 1512 | | |||
1510 | // Split the quads into separate lists for each type | 1513 | // Split the quads into separate lists for each type | ||
1511 | foreach (const WindowQuad &quad, data.quads) { | 1514 | for (const WindowQuad &quad : qAsConst(data.quads)) { | ||
1512 | switch (quad.type()) { | 1515 | switch (quad.type()) { | ||
1513 | case WindowQuadDecoration: | 1516 | case WindowQuadDecoration: | ||
1514 | quads[DecorationLeaf].append(quad); | 1517 | quads[DecorationLeaf].append(quad); | ||
Context not available. |