tmf: Avoid redrawing background for every time graph entry.
authorPatrick Tasse <patrick.tasse@gmail.com>
Wed, 12 Aug 2015 19:02:40 +0000 (15:02 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Thu, 20 Aug 2015 22:24:26 +0000 (18:24 -0400)
commit83b36bb4b032ec7f99647c4f178939fcd6427c5f
treea5eac00fcfab60954e8ab63e0b58efb5f5b93258
parent1bee05352e47841de71ff540d348615a66b4d03a
tmf: Avoid redrawing background for every time graph entry.

The whole background is already filled for the bounds of the time graph.
It is unnecessary to draw it again for every time graph entry. For the
selected entry and entries with no time events, the background with
different color and/or bounds needs to overwrite the default. The drag
zoom range does not need to be painted for every time graph entry, it is
already painted over with transparency after all items have been drawn.

These backgrounds are painted in one step before any of the item states
are drawn. This will allow to paint elements that should be below the
time events (such as gridlines) over the time graph background without
them being overwritten by the unnecessary redrawing of the background.

The computation of item, name and state rectangle bounds is optimized.

The state rectangle height computation is changed to ensure that the
default margin height of 3 pixels does not make it too small.

Change-Id: I2ef87fb3ab2963f5dfeca3f3d1c7d55618dead23
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/54038
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphBaseControl.java
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java
This page took 0.036216 seconds and 5 git commands to generate.