libsysprof-gtk: add snapshot_motion to chart layer

This allows snapshoting the motion highlight separate from the rest of the
layer so that we can have better render tree diffs. Otherwise we risk
having to snapshot a large dataset from the chart layer itself rather than
just the hightlight areas that changed.
This commit is contained in:
Christian Hergert
2023-06-20 12:45:43 -07:00
parent 86f5fc6338
commit d68f2ff87a
3 changed files with 130 additions and 3 deletions

View File

@ -129,3 +129,16 @@ sysprof_chart_layer_set_title (SysprofChartLayer *self,
if (g_set_str (&priv->title, title))
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_TITLE]);
}
void
sysprof_chart_layer_snapshot_motion (SysprofChartLayer *self,
GtkSnapshot *snapshot,
double x,
double y)
{
g_return_if_fail (SYSPROF_IS_CHART_LAYER (self));
g_return_if_fail (GTK_IS_SNAPSHOT (snapshot));
if (SYSPROF_CHART_LAYER_GET_CLASS (self)->snapshot_motion)
SYSPROF_CHART_LAYER_GET_CLASS (self)->snapshot_motion (self, snapshot, x, y);
}