Only recalculate renderTargetMatrix if it is needed
If there's no changes then there's no need to recalculate the projection matrix.
This commit is contained in:
parent
695cc7c010
commit
3922f468b4
1 changed files with 4 additions and 0 deletions
|
@ -428,6 +428,10 @@ QRect Scene::renderTargetRect() const
|
|||
|
||||
void Scene::setRenderTargetRect(const QRect &rect)
|
||||
{
|
||||
if (rect == m_renderTargetRect) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_renderTargetRect = rect;
|
||||
m_renderTargetProjectionMatrix = createProjectionMatrix(rect);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue