Lines Matching defs:gfx_state
122 teken_gfx_t gfx_state = { 0 };
193 return (ptov((uint32_t)gfx_state.tg_fb.fb_addr));
286 roff = ffs(gfx_state.tg_fb.fb_mask_red) - 1;
287 goff = ffs(gfx_state.tg_fb.fb_mask_green) - 1;
288 boff = ffs(gfx_state.tg_fb.fb_mask_blue) - 1;
289 bpp = roundup2(gfx_state.tg_fb.fb_bpp, 8) >> 3;
292 rmask = gfx_state.tg_fb.fb_mask_red >> roff;
297 gmask = gfx_state.tg_fb.fb_mask_green >> goff;
302 bmask = gfx_state.tg_fb.fb_mask_blue >> boff;
424 if (DestinationY + Height > gfx_state.tg_fb.fb_height)
427 if (DestinationX + Width > gfx_state.tg_fb.fb_width)
434 roff = ffs(gfx_state.tg_fb.fb_mask_red) - 1;
435 goff = ffs(gfx_state.tg_fb.fb_mask_green) - 1;
436 boff = ffs(gfx_state.tg_fb.fb_mask_blue) - 1;
438 if (gfx_state.tg_fb.fb_bpp == 8) {
442 (gfx_state.tg_fb.fb_mask_red >> roff)) << roff;
444 (gfx_state.tg_fb.fb_mask_green >> goff)) << goff;
446 (gfx_state.tg_fb.fb_mask_blue >> boff)) << boff;
449 bpp = roundup2(gfx_state.tg_fb.fb_bpp, 8) >> 3;
450 pitch = gfx_state.tg_fb.fb_stride * bpp;
452 size = gfx_state.tg_fb.fb_size;
508 gfx_state.tg_fb.fb_height)
511 if (SourceX + Width > gfx_state.tg_fb.fb_width)
520 bpp = roundup2(gfx_state.tg_fb.fb_bpp, 8) >> 3;
521 pitch = gfx_state.tg_fb.fb_stride * bpp;
525 rp = ffs(gfx_state.tg_fb.fb_mask_red) - 1;
526 gp = ffs(gfx_state.tg_fb.fb_mask_green) - 1;
527 bp = ffs(gfx_state.tg_fb.fb_mask_blue) - 1;
528 rm = gfx_state.tg_fb.fb_mask_red >> rp;
529 gm = gfx_state.tg_fb.fb_mask_green >> gp;
530 bm = gfx_state.tg_fb.fb_mask_blue >> bp;
608 gfx_state.tg_fb.fb_height)
611 if (DestinationX + Width > gfx_state.tg_fb.fb_width)
620 bpp = roundup2(gfx_state.tg_fb.fb_bpp, 8) >> 3;
621 pitch = gfx_state.tg_fb.fb_stride * bpp;
625 rp = ffs(gfx_state.tg_fb.fb_mask_red) - 1;
626 gp = ffs(gfx_state.tg_fb.fb_mask_green) - 1;
627 bp = ffs(gfx_state.tg_fb.fb_mask_blue) - 1;
628 rm = gfx_state.tg_fb.fb_mask_red >> rp;
629 gm = gfx_state.tg_fb.fb_mask_green >> gp;
630 bm = gfx_state.tg_fb.fb_mask_blue >> bp;
706 gfx_state.tg_fb.fb_height)
709 if (SourceX + Width > gfx_state.tg_fb.fb_width)
713 gfx_state.tg_fb.fb_height)
716 if (DestinationX + Width > gfx_state.tg_fb.fb_width)
722 bpp = roundup2(gfx_state.tg_fb.fb_bpp, 8) >> 3;
723 pitch = gfx_state.tg_fb.fb_stride * bpp;
754 if (gfx_state.tg_shadow_fb == NULL)
757 fbX = gfx_state.tg_fb.fb_width;
758 fbY = gfx_state.tg_fb.fb_height;
774 gfx_state.tg_shadow_fb[off + x] = *BltBuffer;
788 EFI_GRAPHICS_OUTPUT *gop = gfx_state.tg_private;
1361 if (gfx_state.tg_shadow_fb != NULL) {
1362 uint32_t pitch = gfx_state.tg_fb.fb_width;
1367 buf = (void *)(gfx_state.tg_shadow_fb +
1368 (y - gfx_state.tg_origin.tp_row) * pitch +
1369 x - gfx_state.tg_origin.tp_col);
1382 if (gfx_state.tg_glyph_size != GlyphBufferSize)
1435 ap = teken_get_curattr(&gfx_state.tg_teken);
1455 if (gfx_state.tg_fb_type == FB_TEXT)
1460 if (x >= gfx_state.tg_fb.fb_width ||
1461 y >= gfx_state.tg_fb.fb_height)
1476 if (gfx_state.tg_fb_type == FB_TEXT)
1498 if (gfx_state.tg_fb_type == FB_TEXT)
1555 if (gfx_state.tg_fb_type == FB_TEXT)
1628 if (gfx_state.tg_fb_type == FB_TEXT)
1631 vf_width = gfx_state.tg_font.vf_width;
1632 vf_height = gfx_state.tg_font.vf_height;
1651 term_image_display(&gfx_state, &r);
1656 x1 = (ux1 + 1) * vf_width + gfx_state.tg_origin.tp_col;
1657 y1 = uy1 * vf_height + gfx_state.tg_origin.tp_row + yshift;
1658 x2 = ux2 * vf_width + gfx_state.tg_origin.tp_col;
1660 y2 = uy2 * vf_height + gfx_state.tg_origin.tp_row;
1667 x1 = ux1 * vf_width + gfx_state.tg_origin.tp_col + xshift;
1668 y1 = uy1 * vf_height + gfx_state.tg_origin.tp_row;
1670 y2 = uy2 * vf_height + gfx_state.tg_origin.tp_row;
1672 x1 = ux2 * vf_width + gfx_state.tg_origin.tp_col;
1677 x1 = ux1 * vf_width + gfx_state.tg_origin.tp_col + xshift;
1678 y1 = uy1 * vf_height + gfx_state.tg_origin.tp_row;
1681 x2 = ux1 * vf_width + gfx_state.tg_origin.tp_col;
1683 y2 = uy1 * vf_height + gfx_state.tg_origin.tp_row + yshift;
1688 x1 = ux1 * vf_width + gfx_state.tg_origin.tp_col;
1690 y1 = uy2 * vf_height + gfx_state.tg_origin.tp_row;
1692 x2 = ux1 * vf_width + gfx_state.tg_origin.tp_col + xshift;
1693 y2 = uy2 * vf_height + gfx_state.tg_origin.tp_row;
1698 x1 = ux2 * vf_width + gfx_state.tg_origin.tp_col;
1699 y1 = uy1 * vf_height + gfx_state.tg_origin.tp_row + yshift;
1700 x2 = ux2 * vf_width + gfx_state.tg_origin.tp_col;
1702 y2 = uy1 * vf_height + gfx_state.tg_origin.tp_row;
1708 x1 = ux2 * vf_width + gfx_state.tg_origin.tp_col;
1709 y1 = uy2 * vf_height + gfx_state.tg_origin.tp_row;
1711 x2 = ux2 * vf_width + gfx_state.tg_origin.tp_col;
1713 y2 = uy2 * vf_height + gfx_state.tg_origin.tp_row;
1737 if (gfx_state.tg_fb_type == FB_TEXT) {
1749 if (ux1 > gfx_state.tg_fb.fb_width ||
1750 uy1 > gfx_state.tg_fb.fb_height) {
1786 if (ux2 > gfx_state.tg_fb.fb_width ||
1787 uy2 > gfx_state.tg_fb.fb_height) {
1808 ux2 = gfx_state.tg_fb.fb_width - gfx_state.tg_origin.tp_col;
1817 uy2 = gfx_state.tg_fb.fb_height - gfx_state.tg_origin.tp_row;
1837 rect.tr_begin.tp_col = ux1 / gfx_state.tg_font.vf_width;
1838 rect.tr_begin.tp_row = uy1 / gfx_state.tg_font.vf_height;
1839 rect.tr_end.tp_col = (ux1 + fwidth) / gfx_state.tg_font.vf_width;
1840 rect.tr_end.tp_row = (uy1 + fheight) / gfx_state.tg_font.vf_height;
1846 term_image_display(&gfx_state, &rect);
1875 rs = 8 - (fls(gfx_state.tg_fb.fb_mask_red) -
1876 ffs(gfx_state.tg_fb.fb_mask_red) + 1);
1877 gs = 8 - (fls(gfx_state.tg_fb.fb_mask_green) -
1878 ffs(gfx_state.tg_fb.fb_mask_green) + 1);
1879 bs = 8 - (fls(gfx_state.tg_fb.fb_mask_blue) -
1880 ffs(gfx_state.tg_fb.fb_mask_blue) + 1);
2027 dp = gfx_state.tg_fb.fb_width *
2028 gfx_state.tg_fb.fb_width +
2029 gfx_state.tg_fb.fb_height *
2030 gfx_state.tg_fb.fb_height;
2052 if (gfx_state.tg_fb_type == FB_TEXT)
2177 teken_input(&gfx_state.tg_teken, clear, sizeof(clear));
2178 gfx_state.tg_functions->tf_param(&gfx_state, TP_SHOWCURSOR, 0);
2705 cons_update_mode(gfx_state.tg_fb_type != FB_TEXT);
2754 (void) cons_update_mode(gfx_state.tg_fb_type != FB_TEXT);
2814 (void) cons_update_mode(gfx_state.tg_fb_type != FB_TEXT);
2840 (void) cons_update_mode(gfx_state.tg_fb_type != FB_TEXT);
2953 if (gfx_state.tg_font.vf_width == fl->font_data->vfbd_width &&
2954 gfx_state.tg_font.vf_height == fl->font_data->vfbd_height) {