Changeset 34024 in vbox for trunk/src/VBox/Devices/Graphics/DevVGATmpl.h
- Timestamp:
- Nov 12, 2010 9:47:37 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 67690
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGATmpl.h
r33974 r34024 59 59 int font_data, 60 60 uint32_t xorcol, 61 uint32_t bgcol) 61 uint32_t bgcol, 62 int dscan, 63 int linesize) 62 64 { 63 65 #if BPP == 1 64 66 ((uint32_t *)d)[0] = (dmask16[(font_data >> 4)] & xorcol) ^ bgcol; 65 67 ((uint32_t *)d)[1] = (dmask16[(font_data >> 0) & 0xf] & xorcol) ^ bgcol; 68 if (dscan) { 69 uint8_t *c = d + linesize; 70 ((uint32_t *)c)[0] = ((uint32_t *)d)[0]; 71 ((uint32_t *)c)[1] = ((uint32_t *)d)[1]; 72 } 66 73 #elif BPP == 2 67 74 ((uint32_t *)d)[0] = (dmask4[(font_data >> 6)] & xorcol) ^ bgcol; … … 69 76 ((uint32_t *)d)[2] = (dmask4[(font_data >> 2) & 3] & xorcol) ^ bgcol; 70 77 ((uint32_t *)d)[3] = (dmask4[(font_data >> 0) & 3] & xorcol) ^ bgcol; 78 if (dscan) 79 memcpy(d + linesize, d, 4 * sizeof(uint32_t)); 71 80 #else 72 81 ((uint32_t *)d)[0] = (-((font_data >> 7)) & xorcol) ^ bgcol; … … 78 87 ((uint32_t *)d)[6] = (-((font_data >> 1) & 1) & xorcol) ^ bgcol; 79 88 ((uint32_t *)d)[7] = (-((font_data >> 0) & 1) & xorcol) ^ bgcol; 89 if (dscan) 90 memcpy(d + linesize, d, 8 * sizeof(uint32_t)); 80 91 #endif 81 92 } … … 83 94 static void glue(vga_draw_glyph8_, DEPTH)(uint8_t *d, int linesize, 84 95 const uint8_t *font_ptr, int h, 85 uint32_t fgcol, uint32_t bgcol )96 uint32_t fgcol, uint32_t bgcol, int dscan) 86 97 { 87 98 uint32_t xorcol; … … 91 102 do { 92 103 font_data = font_ptr[0]; 93 glue(vga_draw_glyph_line_, DEPTH)(d, font_data, xorcol, bgcol );104 glue(vga_draw_glyph_line_, DEPTH)(d, font_data, xorcol, bgcol, dscan, linesize); 94 105 font_ptr += 4; 95 d += linesize ;106 d += linesize << dscan; 96 107 } while (--h); 97 108 } … … 99 110 static void glue(vga_draw_glyph16_, DEPTH)(uint8_t *d, int linesize, 100 111 const uint8_t *font_ptr, int h, 101 uint32_t fgcol, uint32_t bgcol )112 uint32_t fgcol, uint32_t bgcol, int dscan) 102 113 { 103 114 uint32_t xorcol; … … 109 120 glue(vga_draw_glyph_line_, DEPTH)(d, 110 121 expand4to8[font_data >> 4], 111 xorcol, bgcol );122 xorcol, bgcol, dscan, linesize); 112 123 glue(vga_draw_glyph_line_, DEPTH)(d + 8 * BPP, 113 124 expand4to8[font_data & 0x0f], 114 xorcol, bgcol );125 xorcol, bgcol, dscan, linesize); 115 126 font_ptr += 4; 116 d += linesize ;127 d += linesize << dscan; 117 128 } while (--h); 118 129 }
Note:
See TracChangeset
for help on using the changeset viewer.