Lines Matching refs:gfx_state
596 ap = teken_get_defattr(&gfx_state.tg_teken); in vidc_set_colors()
615 teken_set_defattr(&gfx_state.tg_teken, &a); in vidc_set_colors()
618 teken_input(&gfx_state.tg_teken, "\e[2J", 4); in vidc_set_colors()
626 if (gfx_state.tg_fb_type == FB_TEXT) in env_screen_nounset()
642 roff = ffs(gfx_state.tg_fb.fb_mask_red) - 1; in vidc_load_palette()
643 goff = ffs(gfx_state.tg_fb.fb_mask_green) - 1; in vidc_load_palette()
644 boff = ffs(gfx_state.tg_fb.fb_mask_blue) - 1; in vidc_load_palette()
646 gfx_state.tg_fb.fb_mask_red >> roff, roff, in vidc_load_palette()
647 gfx_state.tg_fb.fb_mask_green >> goff, goff, in vidc_load_palette()
648 gfx_state.tg_fb.fb_mask_blue >> boff, boff); in vidc_load_palette()
674 teken_set_defattr(&gfx_state.tg_teken, &attr); in cons_draw_frame()
676 gfx_fb_drawrect(0, 0, gfx_state.tg_fb.fb_width, in cons_draw_frame()
677 gfx_state.tg_origin.tp_row, 1); in cons_draw_frame()
679 gfx_state.tg_fb.fb_height - gfx_state.tg_origin.tp_row - 1, in cons_draw_frame()
680 gfx_state.tg_fb.fb_width, gfx_state.tg_fb.fb_height, 1); in cons_draw_frame()
681 gfx_fb_drawrect(0, gfx_state.tg_origin.tp_row, in cons_draw_frame()
682 gfx_state.tg_origin.tp_col, in cons_draw_frame()
683 gfx_state.tg_fb.fb_height - gfx_state.tg_origin.tp_row - 1, 1); in cons_draw_frame()
685 gfx_state.tg_fb.fb_width - gfx_state.tg_origin.tp_col - 1, in cons_draw_frame()
686 gfx_state.tg_origin.tp_row, gfx_state.tg_fb.fb_width, in cons_draw_frame()
687 gfx_state.tg_fb.fb_height, 1); in cons_draw_frame()
690 teken_set_defattr(&gfx_state.tg_teken, &attr); in cons_draw_frame()
796 if (gfx_state.tg_fb_type != FB_TEXT) in vidc_install_font()
852 from = font_lookup(&gfx_state.tg_font, c, &a); in vidc_install_font()
890 gfx_state.tg_tp.tp_row = TEXT_ROWS; in cons_update_mode()
891 gfx_state.tg_tp.tp_col = TEXT_COLS; in cons_update_mode()
894 setup_font(&gfx_state, gfx_state.tg_fb.fb_height, in cons_update_mode()
895 gfx_state.tg_fb.fb_width); in cons_update_mode()
897 gfx_state.tg_origin.tp_row = (gfx_state.tg_fb.fb_height - in cons_update_mode()
898 (gfx_state.tg_tp.tp_row * gfx_state.tg_font.vf_height)) / 2; in cons_update_mode()
899 gfx_state.tg_origin.tp_col = (gfx_state.tg_fb.fb_width - in cons_update_mode()
900 (gfx_state.tg_tp.tp_col * gfx_state.tg_font.vf_width)) / 2; in cons_update_mode()
902 gfx_state.tg_glyph_size = gfx_state.tg_font.vf_height * in cons_update_mode()
903 gfx_state.tg_font.vf_width * 4; in cons_update_mode()
904 free(gfx_state.tg_glyph); in cons_update_mode()
905 gfx_state.tg_glyph = malloc(gfx_state.tg_glyph_size); in cons_update_mode()
906 if (gfx_state.tg_glyph == NULL) in cons_update_mode()
908 gfx_state.tg_functions = &tfx; in cons_update_mode()
909 snprintf(env, sizeof (env), "%d", gfx_state.tg_fb.fb_height); in cons_update_mode()
912 snprintf(env, sizeof (env), "%d", gfx_state.tg_fb.fb_width); in cons_update_mode()
915 snprintf(env, sizeof (env), "%d", gfx_state.tg_fb.fb_bpp); in cons_update_mode()
920 setup_font(&gfx_state, in cons_update_mode()
921 16 * gfx_state.tg_fb.fb_height, in cons_update_mode()
922 8 * gfx_state.tg_fb.fb_width); in cons_update_mode()
923 gfx_state.tg_functions = &tf; in cons_update_mode()
932 screen_buffer = malloc(gfx_state.tg_tp.tp_row * gfx_state.tg_tp.tp_col * in cons_update_mode()
937 teken_init(&gfx_state.tg_teken, gfx_state.tg_functions, &gfx_state); in cons_update_mode()
939 if (gfx_state.tg_ctype == CT_INDEXED) in cons_update_mode()
944 roff = ffs(gfx_state.tg_fb.fb_mask_red) - 1; in cons_update_mode()
945 goff = ffs(gfx_state.tg_fb.fb_mask_green) - 1; in cons_update_mode()
946 boff = ffs(gfx_state.tg_fb.fb_mask_blue) - 1; in cons_update_mode()
948 gfx_state.tg_fb.fb_mask_red >> roff, roff, in cons_update_mode()
949 gfx_state.tg_fb.fb_mask_green >> goff, goff, in cons_update_mode()
950 gfx_state.tg_fb.fb_mask_blue >> boff, boff); in cons_update_mode()
952 if (gfx_state.tg_ctype == CT_INDEXED && use_gfx_mode) in cons_update_mode()
955 teken_set_winsize(&gfx_state.tg_teken, &gfx_state.tg_tp); in cons_update_mode()
956 a = teken_get_defattr(&gfx_state.tg_teken); in cons_update_mode()
970 teken_set_defattr(&gfx_state.tg_teken, &attr); in cons_update_mode()
983 teken_set_defattr(&gfx_state.tg_teken, &attr); in cons_update_mode()
985 snprintf(env, sizeof (env), "%u", (unsigned)gfx_state.tg_tp.tp_row); in cons_update_mode()
987 snprintf(env, sizeof (env), "%u", (unsigned)gfx_state.tg_tp.tp_col); in cons_update_mode()
993 teken_input(&gfx_state.tg_teken, "\e[2J", 4); in cons_update_mode()
994 gfx_state.tg_functions->tf_param(&gfx_state, TP_SHOWCURSOR, 1); in cons_update_mode()
1065 teken_input(&gfx_state.tg_teken, &ch, sizeof (ch)); in vidc_putchar()