Commit 6f96d8f1 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner.NodeInstances: Render faster

parent 73b431a9
......@@ -199,7 +199,7 @@ QImage GraphicsObjectNodeInstance::renderImage() const
QRectF boundingRect = graphicsObject()->boundingRect();
QSize boundingSize = boundingRect.size().toSize();
QImage image(boundingSize, QImage::Format_ARGB32_Premultiplied);
QImage image(boundingSize, QImage::Format_ARGB32);
if (image.isNull())
return image;
......@@ -219,7 +219,7 @@ QImage GraphicsObjectNodeInstance::renderImage() const
foreach(QGraphicsItem *graphicsItem, graphicsObject()->childItems())
paintRecursively(graphicsItem, &painter);
return image;
return image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
}
void GraphicsObjectNodeInstance::paintRecursively(QGraphicsItem *graphicsItem, QPainter *painter) const
......
......@@ -1027,7 +1027,7 @@ void NodeInstanceServer::findItemChangesAndSendChangeCommands()
if (!parentChangedSet.isEmpty())
sendChildrenChangedCommand(parentChangedSet.toList());
if (!m_dirtyInstanceSet.isEmpty() && nodeInstanceClient()->bytesToWrite() < 100000) {
if (!m_dirtyInstanceSet.isEmpty() && nodeInstanceClient()->bytesToWrite() < 10000) {
nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand(m_dirtyInstanceSet.toList()));
m_dirtyInstanceSet.clear();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment