QmlDesigner.NodeInstances: Render faster

This commit is contained in:
Marco Bubke
2011-02-03 21:48:21 +01:00
parent 73b431a91a
commit 6f96d8f12c
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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();
}