forked from qt-creator/qt-creator
QmlDesigner.NodeInstances: Render faster
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user