Changeset View
Changeset View
Standalone View
Standalone View
plugins/scenes/xrender/scene_xrender.cpp
Show First 20 Lines • Show All 1220 Lines • ▼ Show 20 Line(s) | 1207 | { | |||
---|---|---|---|---|---|
1221 | const QRect bottom(QPoint(0, left.y() + left.height()), m_sizes[int(DecorationPart::Bottom)]); | 1221 | const QRect bottom(QPoint(0, left.y() + left.height()), m_sizes[int(DecorationPart::Bottom)]); | ||
1222 | 1222 | | |||
1223 | xcb_connection_t *c = connection(); | 1223 | xcb_connection_t *c = connection(); | ||
1224 | if (m_gc == 0) { | 1224 | if (m_gc == 0) { | ||
1225 | m_gc = xcb_generate_id(connection()); | 1225 | m_gc = xcb_generate_id(connection()); | ||
1226 | xcb_create_gc(c, m_gc, m_pixmaps[int(DecorationPart::Top)], 0, nullptr); | 1226 | xcb_create_gc(c, m_gc, m_pixmaps[int(DecorationPart::Top)], 0, nullptr); | ||
1227 | } | 1227 | } | ||
1228 | auto renderPart = [this, c](const QRect &geo, const QPoint &offset, int index) { | 1228 | auto renderPart = [this, c](const QRect &geo, const QPoint &offset, int index) { | ||
1229 | if (geo.isNull()) { | 1229 | if (!geo.isValid()) { | ||
1230 | return; | 1230 | return; | ||
1231 | } | 1231 | } | ||
1232 | QImage image = renderToImage(geo); | 1232 | QImage image = renderToImage(geo); | ||
1233 | Q_ASSERT(image.devicePixelRatio() == 1); | 1233 | Q_ASSERT(image.devicePixelRatio() == 1); | ||
1234 | xcb_put_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, m_pixmaps[index], m_gc, | 1234 | xcb_put_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, m_pixmaps[index], m_gc, | ||
1235 | image.width(), image.height(), geo.x() - offset.x(), geo.y() - offset.y(), 0, 32, | 1235 | image.width(), image.height(), geo.x() - offset.x(), geo.y() - offset.y(), 0, 32, | ||
1236 | image.byteCount(), image.constBits()); | 1236 | image.byteCount(), image.constBits()); | ||
1237 | }; | 1237 | }; | ||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |