Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
6f96d8f1
Commit
6f96d8f1
authored
Feb 03, 2011
by
Marco Bubke
Browse files
QmlDesigner.NodeInstances: Render faster
parent
73b431a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/designercore/instances/graphicsobjectnodeinstance.cpp
View file @
6f96d8f1
...
...
@@ -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
...
...
src/plugins/qmldesigner/designercore/instances/nodeinstanceserver.cpp
View file @
6f96d8f1
...
...
@@ -1027,7 +1027,7 @@ void NodeInstanceServer::findItemChangesAndSendChangeCommands()
if
(
!
parentChangedSet
.
isEmpty
())
sendChildrenChangedCommand
(
parentChangedSet
.
toList
());
if
(
!
m_dirtyInstanceSet
.
isEmpty
()
&&
nodeInstanceClient
()
->
bytesToWrite
()
<
10000
0
)
{
if
(
!
m_dirtyInstanceSet
.
isEmpty
()
&&
nodeInstanceClient
()
->
bytesToWrite
()
<
10000
)
{
nodeInstanceClient
()
->
pixmapChanged
(
createPixmapChangedCommand
(
m_dirtyInstanceSet
.
toList
()));
m_dirtyInstanceSet
.
clear
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment