Yes, the image is always changed when the update is invoked.

On Mon, Mar 7, 2016 at 4:43 PM, Filip Piechocki <fpiecho...@gmail.com>
wrote:

> Hi,
>
> Why are you re-creating the texture on every node update? Does the
> m_Renderer->getImage() really changes? My first guess would be that the
> texture creation from image is the most costly part here (uploading the
> texture to GPU?) and I would do this only if necessary (the image really
> changes).
>
> BR,
> Filip
>
> On Mon, Mar 7, 2016 at 3:04 PM, Jani Tykka <jty...@broadsoft.com> wrote:
>
>> Hi,
>>
>> We are rendering QImages on QQuickItem as following:
>>
>> QSGNode * DisplayItem::updatePaintNode( QSGNode * node, UpdatePaintNodeData 
>> * /*data*/ )
>>
>> {
>>
>>      QSGSimpleTextureNode * n = static_cast< QSGSimpleTextureNode* >( node );
>>
>>      if ( !n )
>>
>>              n = new QSGSimpleTextureNode;
>>
>>
>>      n->setRect( 0, 0, width(), height() );
>>
>>
>>      delete m_Texture;
>>
>>
>>      m_Texture = window()->createTextureFromImage( m_Renderer->getImage() );
>>
>>      n->setTexture( m_Texture );
>>
>>
>>      return n;
>>
>> }
>>
>>
>>
>> It seems that computers with separate GPU there is a decent amount of CPU 
>> utilised. We are running into problems if the machine lacks GPU, then with 
>> large images the CPU usage grows drastically. Any suggestions how to improve 
>> large image painting on QQuickItem? With Quick1 and painting directly on 
>> HWND/CocoaWindow we didn't experience this high CPU usage.
>>
>>
>>
>> This email is intended solely for the person or entity to which it is
>> addressed and may contain confidential and/or privileged information. If
>> you are not the intended recipient and have received this email in error,
>> please notify BroadSoft, Inc. immediately by replying to this message, and
>> destroy all copies of this message, along with any attachment, prior to
>> reading, distributing or copying it.
>>
>> _______________________________________________
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>


-- 
*Jani Tykkä*
Development Manager | BroadSoft, Inc. | +358 44 596 0587 |
jty...@broadsoft.com

-- 


This email is intended solely for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. If 
you are not the intended recipient and have received this email in error, 
please notify BroadSoft, Inc. immediately by replying to this message, and 
destroy all copies of this message, along with any attachment, prior to 
reading, distributing or copying it.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to