Lines Matching refs:pane
312 xoffset + (gr->pane->max_num_vertices - gr->index - 1) * 2 - 1, in hud_draw_graph_line_strip()
327 const struct hud_pane *pane) in hud_pane_accumulate_vertices() argument
333 const unsigned last_line = pane->last_line; in hud_pane_accumulate_vertices()
337 pane->x1, pane->y1, in hud_pane_accumulate_vertices()
338 pane->x2, pane->y2); in hud_pane_accumulate_vertices()
342 unsigned x = pane->x2 + 2; in hud_pane_accumulate_vertices()
343 unsigned y = pane->inner_y1 + in hud_pane_accumulate_vertices()
344 pane->inner_height * (last_line - i) / last_line - in hud_pane_accumulate_vertices()
347 number_to_human_readable(pane->max_value * i / last_line, in hud_pane_accumulate_vertices()
348 pane->type, str); in hud_pane_accumulate_vertices()
354 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) { in hud_pane_accumulate_vertices()
355 unsigned x = pane->x1 + 2; in hud_pane_accumulate_vertices()
356 unsigned y = pane->y2 + 2 + i*hud->font.glyph_height; in hud_pane_accumulate_vertices()
358 number_to_human_readable(gr->current_value, pane->type, str); in hud_pane_accumulate_vertices()
365 line_verts[num++] = (float) pane->x1; in hud_pane_accumulate_vertices()
366 line_verts[num++] = (float) pane->y1; in hud_pane_accumulate_vertices()
367 line_verts[num++] = (float) pane->x2; in hud_pane_accumulate_vertices()
368 line_verts[num++] = (float) pane->y1; in hud_pane_accumulate_vertices()
370 line_verts[num++] = (float) pane->x2; in hud_pane_accumulate_vertices()
371 line_verts[num++] = (float) pane->y1; in hud_pane_accumulate_vertices()
372 line_verts[num++] = (float) pane->x2; in hud_pane_accumulate_vertices()
373 line_verts[num++] = (float) pane->y2; in hud_pane_accumulate_vertices()
375 line_verts[num++] = (float) pane->x1; in hud_pane_accumulate_vertices()
376 line_verts[num++] = (float) pane->y2; in hud_pane_accumulate_vertices()
377 line_verts[num++] = (float) pane->x2; in hud_pane_accumulate_vertices()
378 line_verts[num++] = (float) pane->y2; in hud_pane_accumulate_vertices()
380 line_verts[num++] = (float) pane->x1; in hud_pane_accumulate_vertices()
381 line_verts[num++] = (float) pane->y1; in hud_pane_accumulate_vertices()
382 line_verts[num++] = (float) pane->x1; in hud_pane_accumulate_vertices()
383 line_verts[num++] = (float) pane->y2; in hud_pane_accumulate_vertices()
387 float y = round((pane->max_value * i / (double)last_line) * in hud_pane_accumulate_vertices()
388 pane->yscale + pane->inner_y2); in hud_pane_accumulate_vertices()
391 line_verts[num++] = pane->x1; in hud_pane_accumulate_vertices()
393 line_verts[num++] = pane->x2; in hud_pane_accumulate_vertices()
402 const struct hud_pane *pane) in hud_pane_accumulate_vertices_simple() argument
410 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) { in hud_pane_accumulate_vertices_simple()
411 unsigned x = pane->x1; in hud_pane_accumulate_vertices_simple()
412 unsigned y = pane->y_simple + i*hud->font.glyph_height; in hud_pane_accumulate_vertices_simple()
414 number_to_human_readable(gr->current_value, pane->type, str); in hud_pane_accumulate_vertices_simple()
422 const struct hud_pane *pane) in hud_pane_draw_colored_objects() argument
429 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) { in hud_pane_draw_colored_objects()
430 unsigned x = pane->x1 + 2; in hud_pane_draw_colored_objects()
431 unsigned y = pane->y2 + 2 + i*hud->font.glyph_height; in hud_pane_draw_colored_objects()
439 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) { in hud_pane_draw_colored_objects()
440 hud_draw_graph_line_strip(hud, gr, pane->inner_x1, pane->inner_y2, pane->yscale); in hud_pane_draw_colored_objects()
468 struct hud_pane *pane; in hud_draw_results() local
606 LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) { in hud_draw_results()
607 if (pane) in hud_draw_results()
608 hud_pane_draw_colored_objects(hud, pane); in hud_draw_results()
628 struct hud_pane *pane; in hud_start_queries() local
634 LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) { in hud_start_queries()
635 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) { in hud_start_queries()
646 struct hud_pane *pane; in hud_stop_queries() local
682 LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) { in hud_stop_queries()
683 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) { in hud_stop_queries()
687 if (pane->sort_items) { in hud_stop_queries()
688 LIST_FOR_EACH_ENTRY_SAFE(gr, next, &pane->graph_list, head) { in hud_stop_queries()
690 if (&gr->head == pane->graph_list.prev) in hud_stop_queries()
705 hud_pane_accumulate_vertices_simple(hud, pane); in hud_stop_queries()
707 hud_pane_accumulate_vertices(hud, pane); in hud_stop_queries()
768 hud_pane_set_max_value(struct hud_pane *pane, uint64_t value) in hud_pane_set_max_value() argument
786 fixup_bytes(pane->type, i + 1, &exp10); in hud_pane_set_max_value()
795 fixup_bytes(pane->type, i + 1, &exp10); in hud_pane_set_max_value()
800 pane->last_line = 5; /* lines in +1/5 increments */ in hud_pane_set_max_value()
803 pane->last_line = 8; /* lines in +1/4 increments. */ in hud_pane_set_max_value()
807 pane->last_line = leftmost_digit * 2; /* lines in +1/2 increments */ in hud_pane_set_max_value()
813 pane->last_line = leftmost_digit; /* lines in +1 increments */ in hud_pane_set_max_value()
823 pane->last_line = leftmost_digit * 2; /* lines in +1/2 increments. */ in hud_pane_set_max_value()
832 pane->last_line = 5 + i; /* lines in +1/5 increments. */ in hud_pane_set_max_value()
838 pane->max_value = leftmost_digit * exp10; in hud_pane_set_max_value()
839 pane->yscale = -(int)pane->inner_height / (float)pane->max_value; in hud_pane_set_max_value()
843 hud_pane_update_dyn_ceiling(struct hud_graph *gr, struct hud_pane *pane) in hud_pane_update_dyn_ceiling() argument
848 if (pane->dyn_ceil_last_ran != gr->index) { in hud_pane_update_dyn_ceiling()
849 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) { in hud_pane_update_dyn_ceiling()
857 tmp = tmp > pane->initial_max_value ? tmp : pane->initial_max_value; in hud_pane_update_dyn_ceiling()
858 hud_pane_set_max_value(pane, tmp); in hud_pane_update_dyn_ceiling()
865 pane->dyn_ceil_last_ran = gr->index; in hud_pane_update_dyn_ceiling()
875 struct hud_pane *pane = CALLOC_STRUCT(hud_pane); in hud_pane_create() local
877 if (!pane) in hud_pane_create()
880 pane->hud = hud; in hud_pane_create()
881 pane->x1 = x1; in hud_pane_create()
882 pane->y1 = y1; in hud_pane_create()
883 pane->x2 = x2; in hud_pane_create()
884 pane->y2 = y2; in hud_pane_create()
885 pane->y_simple = y_simple; in hud_pane_create()
886 pane->inner_x1 = x1 + 1; in hud_pane_create()
887 pane->inner_x2 = x2 - 1; in hud_pane_create()
888 pane->inner_y1 = y1 + 1; in hud_pane_create()
889 pane->inner_y2 = y2 - 1; in hud_pane_create()
890 pane->inner_width = pane->inner_x2 - pane->inner_x1; in hud_pane_create()
891 pane->inner_height = pane->inner_y2 - pane->inner_y1; in hud_pane_create()
892 pane->period = period; in hud_pane_create()
893 pane->max_num_vertices = (x2 - x1 + 2) / 2; in hud_pane_create()
894 pane->ceiling = ceiling; in hud_pane_create()
895 pane->dyn_ceiling = dyn_ceiling; in hud_pane_create()
896 pane->dyn_ceil_last_ran = 0; in hud_pane_create()
897 pane->sort_items = sort_items; in hud_pane_create()
898 pane->initial_max_value = max_value; in hud_pane_create()
899 hud_pane_set_max_value(pane, max_value); in hud_pane_create()
900 list_inithead(&pane->graph_list); in hud_pane_create()
901 return pane; in hud_pane_create()
920 hud_pane_add_graph(struct hud_pane *pane, struct hud_graph *gr) in hud_pane_add_graph() argument
939 unsigned color = pane->next_color % ARRAY_SIZE(colors); in hud_pane_add_graph()
943 gr->vertices = MALLOC(pane->max_num_vertices * sizeof(float) * 2); in hud_pane_add_graph()
947 gr->pane = pane; in hud_pane_add_graph()
948 list_addtail(&gr->head, &pane->graph_list); in hud_pane_add_graph()
949 pane->num_graphs++; in hud_pane_add_graph()
950 pane->next_color++; in hud_pane_add_graph()
957 value = value > gr->pane->ceiling ? gr->pane->ceiling : value; in hud_graph_add_value()
968 if (gr->index == gr->pane->max_num_vertices) { in hud_graph_add_value()
977 if (gr->num_vertices < gr->pane->max_num_vertices) { in hud_graph_add_value()
981 if (gr->pane->dyn_ceiling == true) { in hud_graph_add_value()
982 hud_pane_update_dyn_ceiling(gr, gr->pane); in hud_graph_add_value()
984 if (value > gr->pane->max_value) { in hud_graph_add_value()
985 hud_pane_set_max_value(gr->pane, value); in hud_graph_add_value()
1186 struct hud_pane *pane = NULL; in hud_parse_env_var() local
1231 if (!pane) { in hud_parse_env_var()
1232 pane = hud_pane_create(hud, x, y, x + width, y + height, y_simple, in hud_parse_env_var()
1234 if (!pane) in hud_parse_env_var()
1239 pane->next_color = 0; in hud_parse_env_var()
1249 hud_fps_graph_install(pane); in hud_parse_env_var()
1252 hud_frametime_graph_install(pane); in hud_parse_env_var()
1255 hud_cpu_graph_install(pane, ALL_CPUS); in hud_parse_env_var()
1258 hud_cpu_graph_install(pane, i); in hud_parse_env_var()
1261 hud_thread_busy_install(pane, name, false); in hud_parse_env_var()
1264 hud_thread_counter_install(pane, name, HUD_COUNTER_OFFLOADED); in hud_parse_env_var()
1267 hud_thread_counter_install(pane, name, HUD_COUNTER_DIRECT); in hud_parse_env_var()
1270 hud_thread_counter_install(pane, name, HUD_COUNTER_SYNCS); in hud_parse_env_var()
1273 hud_thread_busy_install(pane, name, true); in hud_parse_env_var()
1277 hud_nic_graph_install(pane, arg_name, NIC_DIRECTION_RX); in hud_parse_env_var()
1280 hud_nic_graph_install(pane, arg_name, NIC_DIRECTION_TX); in hud_parse_env_var()
1283 hud_nic_graph_install(pane, arg_name, NIC_RSSI_DBM); in hud_parse_env_var()
1284 pane->type = PIPE_DRIVER_QUERY_TYPE_DBM; in hud_parse_env_var()
1287 hud_diskstat_graph_install(pane, arg_name, DISKSTAT_RD); in hud_parse_env_var()
1288 pane->type = PIPE_DRIVER_QUERY_TYPE_BYTES; in hud_parse_env_var()
1291 hud_diskstat_graph_install(pane, arg_name, DISKSTAT_WR); in hud_parse_env_var()
1292 pane->type = PIPE_DRIVER_QUERY_TYPE_BYTES; in hud_parse_env_var()
1295 hud_cpufreq_graph_install(pane, i, CPUFREQ_MINIMUM); in hud_parse_env_var()
1296 pane->type = PIPE_DRIVER_QUERY_TYPE_HZ; in hud_parse_env_var()
1299 hud_cpufreq_graph_install(pane, i, CPUFREQ_CURRENT); in hud_parse_env_var()
1300 pane->type = PIPE_DRIVER_QUERY_TYPE_HZ; in hud_parse_env_var()
1303 hud_cpufreq_graph_install(pane, i, CPUFREQ_MAXIMUM); in hud_parse_env_var()
1304 pane->type = PIPE_DRIVER_QUERY_TYPE_HZ; in hud_parse_env_var()
1309 hud_sensors_temp_graph_install(pane, arg_name, in hud_parse_env_var()
1311 pane->type = PIPE_DRIVER_QUERY_TYPE_TEMPERATURE; in hud_parse_env_var()
1314 hud_sensors_temp_graph_install(pane, arg_name, in hud_parse_env_var()
1316 pane->type = PIPE_DRIVER_QUERY_TYPE_TEMPERATURE; in hud_parse_env_var()
1319 hud_sensors_temp_graph_install(pane, arg_name, in hud_parse_env_var()
1321 pane->type = PIPE_DRIVER_QUERY_TYPE_VOLTS; in hud_parse_env_var()
1324 hud_sensors_temp_graph_install(pane, arg_name, in hud_parse_env_var()
1326 pane->type = PIPE_DRIVER_QUERY_TYPE_AMPS; in hud_parse_env_var()
1329 hud_sensors_temp_graph_install(pane, arg_name, in hud_parse_env_var()
1331 pane->type = PIPE_DRIVER_QUERY_TYPE_WATTS; in hud_parse_env_var()
1336 hud_pipe_query_install(&hud->batch_query, pane, in hud_parse_env_var()
1345 hud_pipe_query_install(&hud->batch_query, pane, in hud_parse_env_var()
1375 hud_pipe_query_install(&hud->batch_query, pane, name, in hud_parse_env_var()
1386 if (!hud_driver_query_install(&hud->batch_query, pane, in hud_parse_env_var()
1398 if (!pane) { in hud_parse_env_var()
1409 hud_pane_set_max_value(pane, i); in hud_parse_env_var()
1410 pane->initial_max_value = i; in hud_parse_env_var()
1422 if (!pane) { in hud_parse_env_var()
1433 if (added && !list_is_empty(&pane->graph_list)) { in hud_parse_env_var()
1435 graph = list_entry(pane->graph_list.prev, struct hud_graph, head); in hud_parse_env_var()
1452 if (!pane) in hud_parse_env_var()
1455 y += height + hud->font.glyph_height * (pane->num_graphs + 2); in hud_parse_env_var()
1456 y_simple += hud->font.glyph_height * (pane->num_graphs + 1); in hud_parse_env_var()
1459 if (pane && pane->num_graphs) { in hud_parse_env_var()
1460 list_addtail(&pane->head, &hud->pane_list); in hud_parse_env_var()
1461 pane = NULL; in hud_parse_env_var()
1472 if (pane && pane->num_graphs) { in hud_parse_env_var()
1473 list_addtail(&pane->head, &hud->pane_list); in hud_parse_env_var()
1474 pane = NULL; in hud_parse_env_var()
1494 if (pane) { in hud_parse_env_var()
1495 if (pane->num_graphs) { in hud_parse_env_var()
1496 list_addtail(&pane->head, &hud->pane_list); in hud_parse_env_var()
1499 FREE(pane); in hud_parse_env_var()
1503 LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) { in hud_parse_env_var()
1506 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) { in hud_parse_env_var()
1790 struct hud_pane *pane, *pane_tmp; in hud_unset_record_context() local
1796 LIST_FOR_EACH_ENTRY_SAFE(pane, pane_tmp, &hud->pane_list, head) { in hud_unset_record_context()
1797 LIST_FOR_EACH_ENTRY_SAFE(graph, graph_tmp, &pane->graph_list, head) { in hud_unset_record_context()
1801 list_del(&pane->head); in hud_unset_record_context()
1802 FREE(pane); in hud_unset_record_context()