Changeset View
Changeset View
Standalone View
Standalone View
plugins/scenes/opengl/scene_opengl.cpp
Show First 20 Lines • Show All 2484 Lines • ▼ Show 20 Line(s) | 2471 | { | |||
---|---|---|---|---|---|
2485 | } | 2485 | } | ||
2486 | 2486 | | |||
2487 | QRect left, top, right, bottom; | 2487 | QRect left, top, right, bottom; | ||
2488 | client()->client()->layoutDecorationRects(left, top, right, bottom); | 2488 | client()->client()->layoutDecorationRects(left, top, right, bottom); | ||
2489 | 2489 | | |||
2490 | const QRect geometry = dirty ? QRect(QPoint(0, 0), client()->client()->geometry().size()) : scheduled.boundingRect(); | 2490 | const QRect geometry = dirty ? QRect(QPoint(0, 0), client()->client()->geometry().size()) : scheduled.boundingRect(); | ||
2491 | 2491 | | |||
2492 | auto renderPart = [this](const QRect &geo, const QRect &partRect, const QPoint &offset, bool rotated = false) { | 2492 | auto renderPart = [this](const QRect &geo, const QRect &partRect, const QPoint &offset, bool rotated = false) { | ||
2493 | if (geo.isNull()) { | 2493 | if (!geo.isValid()) { | ||
2494 | return; | 2494 | return; | ||
2495 | } | 2495 | } | ||
2496 | QImage image = renderToImage(geo); | 2496 | QImage image = renderToImage(geo); | ||
2497 | if (rotated) { | 2497 | if (rotated) { | ||
2498 | // TODO: get this done directly when rendering to the image | 2498 | // TODO: get this done directly when rendering to the image | ||
2499 | image = rotate(image, QRect(geo.topLeft() - partRect.topLeft(), geo.size())); | 2499 | image = rotate(image, QRect(geo.topLeft() - partRect.topLeft(), geo.size())); | ||
2500 | } | 2500 | } | ||
2501 | m_texture->update(image, (geo.topLeft() - partRect.topLeft() + offset) * image.devicePixelRatio()); | 2501 | m_texture->update(image, (geo.topLeft() - partRect.topLeft() + offset) * image.devicePixelRatio()); | ||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |