diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-04-11 17:15:10 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@digia.com> | 2014-04-14 10:50:38 +0200 |
commit | c8a814c28961d3e6faa823c656b5ecbce39565fb (patch) | |
tree | f691ecb3871cd5d4770cd3fa24bb127cf54bee61 /src/plugins/qmlprofiler/qml/TimeMarks.qml | |
parent | 9b2672cb051506fa88c8432ba41911471866793a (diff) | |
download | qt-creator-c8a814c28961d3e6faa823c656b5ecbce39565fb.tar.gz |
QmlProfiler: Always reset the context before drawing on a canvas
The context is stateful and there could be any kind of junk left in it.
In particular, the W3C spec says that it should be set up with a default
clipping path on creation, but it doesn't say what should happen if the
canvas is resized. Thus, we can never be sure that the clipping path is
sane.
Task-number: QTBUG-38297
Change-Id: If04597234e71574573888ce14deac5cf50df4a3f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/plugins/qmlprofiler/qml/TimeMarks.qml')
-rw-r--r-- | src/plugins/qmlprofiler/qml/TimeMarks.qml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/qml/TimeMarks.qml b/src/plugins/qmlprofiler/qml/TimeMarks.qml index 94e8fd058b..7b19272403 100644 --- a/src/plugins/qmlprofiler/qml/TimeMarks.qml +++ b/src/plugins/qmlprofiler/qml/TimeMarks.qml @@ -49,6 +49,8 @@ Canvas { onPaint: { if (context === null) return; // canvas isn't ready + + context.reset(); drawBackgroundBars( context, region ); var totalTime = endTime - startTime; |