summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprofiler/qml/TimeMarks.qml
diff options
context:
space:
mode:
authorChristiaan Janssen <christiaan.janssen@nokia.com>2011-10-28 16:22:45 +0200
committerChristiaan Janssen <christiaan.janssen@nokia.com>2011-11-02 12:18:43 +0100
commit70b01ced495421f70fa2651a6ed0fab624cf1b7b (patch)
tree10cd87d749ffec16e54e350de4b95288d452d575 /src/plugins/qmlprofiler/qml/TimeMarks.qml
parent058878a6c6c2e3df974792be8d449e51f682a232 (diff)
downloadqt-creator-70b01ced495421f70fa2651a6ed0fab624cf1b7b.tar.gz
QmlProfiler: optimizations in canvas repaint
Change-Id: I866f8941129c5a42256f40dca4e4c4fe15b5a760 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qml/TimeMarks.qml')
-rw-r--r--src/plugins/qmlprofiler/qml/TimeMarks.qml22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/plugins/qmlprofiler/qml/TimeMarks.qml b/src/plugins/qmlprofiler/qml/TimeMarks.qml
index eb378a79aa..ca5c129d2b 100644
--- a/src/plugins/qmlprofiler/qml/TimeMarks.qml
+++ b/src/plugins/qmlprofiler/qml/TimeMarks.qml
@@ -33,30 +33,22 @@
import QtQuick 1.0
import Monitor 1.0
-TiledCanvas {
+Canvas2D {
id: timeDisplay
property variant startTime
property variant endTime
property variant timePerPixel
- canvasSize.width: timeDisplay.width
- canvasSize.height: timeDisplay.height
-
- tileSize.width: width
- tileSize.height: height
- canvasWindow.width: width
- canvasWindow.height: height
-
Component.onCompleted: {
- requestPaint();
+ requestRedraw();
}
onWidthChanged: {
- requestPaint();
+ requestRedraw();
}
onHeightChanged: {
- requestPaint();
+ requestRedraw();
}
onDrawRegion: {
@@ -81,13 +73,13 @@ TiledCanvas {
ctxt.font = "8px sans-serif";
for (var ii = 0; ii < blockCount+1; ii++) {
var x = Math.floor(ii*pixelsPerBlock - realStartPos);
- ctxt.strokeStyle = "#909090";
+ ctxt.strokeStyle = "#C0C0C0";
ctxt.beginPath();
ctxt.moveTo(x, 0);
ctxt.lineTo(x, height);
ctxt.stroke();
- ctxt.strokeStyle = "#C0C0C0";
+ ctxt.strokeStyle = "#E0E0E0";
for (var jj=1; jj < 5; jj++) {
var xx = Math.floor(ii*pixelsPerBlock + jj*pixelsPerSection - realStartPos);
ctxt.beginPath();
@@ -102,7 +94,7 @@ TiledCanvas {
if (startTime !== start || endTime !== end) {
startTime = start;
endTime = end;
- requestPaint();
+ requestRedraw();
}
}