diff --git a/effects/screenshot/screenshot.cpp b/effects/screenshot/screenshot.cpp index 79b74a2f8f..35a64cbeb4 100644 --- a/effects/screenshot/screenshot.cpp +++ b/effects/screenshot/screenshot.cpp @@ -229,7 +229,7 @@ void ScreenShotEffect::postPaintScreen() // copy content from framebuffer into image img = QImage(QSize(width, height), QImage::Format_ARGB32); - glReadnPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, img.byteCount(), (GLvoid*)img.bits()); + glReadnPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, img.sizeInBytes(), (GLvoid*)img.bits()); GLRenderTarget::popRenderTarget(); ScreenShotEffect::convertFromGLImage(img, width, height); } diff --git a/libkwineffects/kwinxrenderutils.cpp b/libkwineffects/kwinxrenderutils.cpp index b61b347ece..45dcfbd5ce 100644 --- a/libkwineffects/kwinxrenderutils.cpp +++ b/libkwineffects/kwinxrenderutils.cpp @@ -144,7 +144,7 @@ void XRenderPicture::fromImage(const QImage &img) xcb_gcontext_t cid = xcb_generate_id(c); xcb_create_gc(c, cid, xpix, 0, nullptr); xcb_put_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, xpix, cid, img.width(), img.height(), - 0, 0, 0, depth, img.byteCount(), img.constBits()); + 0, 0, 0, depth, img.sizeInBytes(), img.constBits()); xcb_free_gc(c, cid); d = new XRenderPictureData(createPicture(xpix, depth)); diff --git a/plugins/platforms/virtual/egl_gbm_backend.cpp b/plugins/platforms/virtual/egl_gbm_backend.cpp index 8e83f25778..6bceaee356 100644 --- a/plugins/platforms/virtual/egl_gbm_backend.cpp +++ b/plugins/platforms/virtual/egl_gbm_backend.cpp @@ -224,7 +224,7 @@ void EglGbmBackend::endRenderingFrame(const QRegion &renderedRegion, const QRegi glFlush(); if (m_backend->saveFrames()) { QImage img = QImage(QSize(m_backBuffer->width(), m_backBuffer->height()), QImage::Format_ARGB32); - glReadnPixels(0, 0, m_backBuffer->width(), m_backBuffer->height(), GL_RGBA, GL_UNSIGNED_BYTE, img.byteCount(), (GLvoid*)img.bits()); + glReadnPixels(0, 0, m_backBuffer->width(), m_backBuffer->height(), GL_RGBA, GL_UNSIGNED_BYTE, img.sizeInBytes(), (GLvoid*)img.bits()); convertFromGLImage(img, m_backBuffer->width(), m_backBuffer->height()); img.save(QStringLiteral("%1/%2.png").arg(m_backend->saveFrames()).arg(QString::number(m_frameCounter++))); } diff --git a/plugins/platforms/x11/standalone/x11_decoration_renderer.cpp b/plugins/platforms/x11/standalone/x11_decoration_renderer.cpp index d8b49544a6..4201f185ae 100644 --- a/plugins/platforms/x11/standalone/x11_decoration_renderer.cpp +++ b/plugins/platforms/x11/standalone/x11_decoration_renderer.cpp @@ -94,7 +94,7 @@ void X11Renderer::render() QImage image = renderToImage(geo); xcb_put_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, client()->client()->frameId(), m_gc, image.width(), image.height(), geo.x(), geo.y(), 0, client()->client()->depth(), - image.byteCount(), image.constBits()); + image.sizeInBytes(), image.constBits()); }; renderPart(left); renderPart(top); diff --git a/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.cpp b/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.cpp index 200cc6a37c..cfc3a4e6a5 100644 --- a/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.cpp +++ b/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.cpp @@ -87,7 +87,7 @@ void X11WindowedQPainterBackend::present(int mask, const QRegion &damage) const QImage &buffer = (*it)->buffer; xcb_put_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, (*it)->window, m_gc, buffer.width(), buffer.height(), 0, 0, 0, 24, - buffer.byteCount(), buffer.constBits()); + buffer.sizeInBytes(), buffer.constBits()); } } diff --git a/plugins/platforms/x11/windowed/x11windowed_backend.cpp b/plugins/platforms/x11/windowed/x11windowed_backend.cpp index 12c8ca2ada..76077c960f 100644 --- a/plugins/platforms/x11/windowed/x11windowed_backend.cpp +++ b/plugins/platforms/x11/windowed/x11windowed_backend.cpp @@ -480,7 +480,7 @@ void X11WindowedBackend::createCursor(const QImage &srcImage, const QPoint &hots xcb_create_pixmap(m_connection, 32, pix, m_screen->root, img.width(), img.height()); xcb_create_gc(m_connection, gc, pix, 0, nullptr); - xcb_put_image(m_connection, XCB_IMAGE_FORMAT_Z_PIXMAP, pix, gc, img.width(), img.height(), 0, 0, 0, 32, img.byteCount(), img.constBits()); + xcb_put_image(m_connection, XCB_IMAGE_FORMAT_Z_PIXMAP, pix, gc, img.width(), img.height(), 0, 0, 0, 32, img.sizeInBytes(), img.constBits()); XRenderPicture pic(pix, 32); xcb_render_create_cursor(m_connection, cid, pic, qRound(hotspot.x() * outputScale), qRound(hotspot.y() * outputScale)); diff --git a/plugins/scenes/xrender/scene_xrender.cpp b/plugins/scenes/xrender/scene_xrender.cpp index 57bedbd6d6..9273853f2a 100644 --- a/plugins/scenes/xrender/scene_xrender.cpp +++ b/plugins/scenes/xrender/scene_xrender.cpp @@ -1238,7 +1238,7 @@ void SceneXRenderDecorationRenderer::render() Q_ASSERT(image.devicePixelRatio() == 1); xcb_put_image(c, XCB_IMAGE_FORMAT_Z_PIXMAP, m_pixmaps[index], m_gc, image.width(), image.height(), geo.x() - offset.x(), geo.y() - offset.y(), 0, 32, - image.byteCount(), image.constBits()); + image.sizeInBytes(), image.constBits()); }; const QRect geometry = scheduled.boundingRect(); renderPart(left.intersected(geometry), left.topLeft(), int(DecorationPart::Left));