summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/hud/hud_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-21 21:10:27 +0200
committerMarek Olšák <[email protected]>2017-06-26 02:17:03 +0200
commit11cf079b678aed0c5d4d0df9fa59949ec1d07794 (patch)
tree6324e909b9d217bb035540fd30c2633b78add6ca /src/gallium/auxiliary/hud/hud_context.c
parent5fa69be3c8894a6f313080c3afec7063d5356395 (diff)
gallium/hud: add hud_pane::hud pointer
for later use Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/hud/hud_context.c')
-rw-r--r--src/gallium/auxiliary/hud/hud_context.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index 551cea97a79..ae2e0fb1bee 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -778,7 +778,8 @@ hud_pane_update_dyn_ceiling(struct hud_graph *gr, struct hud_pane *pane)
}
static struct hud_pane *
-hud_pane_create(unsigned x1, unsigned y1, unsigned x2, unsigned y2,
+hud_pane_create(struct hud_context *hud,
+ unsigned x1, unsigned y1, unsigned x2, unsigned y2,
unsigned period, uint64_t max_value, uint64_t ceiling,
boolean dyn_ceiling, boolean sort_items)
{
@@ -787,6 +788,7 @@ hud_pane_create(unsigned x1, unsigned y1, unsigned x2, unsigned y2,
if (!pane)
return NULL;
+ pane->hud = hud;
pane->x1 = x1;
pane->y1 = y1;
pane->x2 = x2;
@@ -1123,8 +1125,8 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
column_width = width > column_width ? width : column_width;
if (!pane) {
- pane = hud_pane_create(x, y, x + width, y + height, period, 10,
- ceiling, dyn_ceiling, sort_items);
+ pane = hud_pane_create(hud, x, y, x + width, y + height, period, 10,
+ ceiling, dyn_ceiling, sort_items);
if (!pane)
return;
}