From 21a94e5e69cd1bf55f223d20a92822218a1d2fe7 Mon Sep 17 00:00:00 2001 From: Ulf Hermann <ulf.hermann@theqtcompany.com> Date: Fri, 28 Aug 2015 16:12:57 +0200 Subject: [PATCH] Timeline: Optimize selection tools for fewer scene graph rebuilds The selection details "windows" contain frequently updated text and can be moved around in the scene. We don't want their contents to be batched with the rest of the scene as there may be many events in the timeline and rebuilding the batch they are in is expensive. The clip property has the side effect of preventing nodes within the clipped area from getting batched with nodes outside it. Thus, by setting the clip property on the details we reduce the number of batch rebuilds for the actual timeline. Having a transparent rectangle in there doesn't help the renderer, either, so we replace it with a plain item. Change-Id: Ie6bac1324d3bc6b8b3d56e658a766f1f90be9046 Task-number: QTCREATORBUG-14983 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> --- src/libs/timeline/qml/MainView.qml | 2 ++ src/libs/timeline/qml/RangeMover.qml | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/timeline/qml/MainView.qml b/src/libs/timeline/qml/MainView.qml index 44ca3a6ce6..ba89b7d63b 100644 --- a/src/libs/timeline/qml/MainView.qml +++ b/src/libs/timeline/qml/MainView.qml @@ -317,6 +317,7 @@ Rectangle { x: 200 y: 125 + clip: true id: selectionRangeDetails visible: selectionRange.visible startTime: zoomControl.selectionStart @@ -345,6 +346,7 @@ Rectangle { x: 200 y: 25 + clip: true locked: content.selectionLocked models: timelineModelAggregator.models notes: timelineModelAggregator.notes diff --git a/src/libs/timeline/qml/RangeMover.qml b/src/libs/timeline/qml/RangeMover.qml index 09396368c1..96ba7d9943 100644 --- a/src/libs/timeline/qml/RangeMover.qml +++ b/src/libs/timeline/qml/RangeMover.qml @@ -30,10 +30,9 @@ import QtQuick 2.1 -Rectangle { +Item { id: rangeMover anchors.fill: parent - color: "transparent" signal rangeDoubleClicked() property color handleColor: "#869cd1" -- GitLab