mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 21:16:50 +03:00
more #ifdef WITH_8BPP_SUPPORT
svn path=/trunk/netsurf/; revision=13467
This commit is contained in:
parent
20e825c8f4
commit
174b52a0fd
@ -477,15 +477,19 @@ static void draw_glyph1(FONT_PLOTTER self, GRECT * loc, uint8_t * pixdata, int p
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef WITH_8BPP_SUPPORT
|
||||||
if( app.nplanes > 8 ){
|
if( app.nplanes > 8 ){
|
||||||
|
#endif
|
||||||
unsigned short out[4];
|
unsigned short out[4];
|
||||||
rgb_to_vdi1000( (unsigned char*)&colour, (unsigned short*)&out );
|
rgb_to_vdi1000( (unsigned char*)&colour, (unsigned short*)&out );
|
||||||
vs_color( self->plotter->vdi_handle, OFFSET_CUSTOM_COLOR, (unsigned short*)&out[0] );
|
vs_color( self->plotter->vdi_handle, OFFSET_CUSTOM_COLOR, (unsigned short*)&out[0] );
|
||||||
self->plotter->plot_mfdb( self->plotter, loc, &tmp, OFFSET_CUSTOM_COLOR, PLOT_FLAG_TRANS );
|
self->plotter->plot_mfdb( self->plotter, loc, &tmp, OFFSET_CUSTOM_COLOR, PLOT_FLAG_TRANS );
|
||||||
|
#ifdef WITH_8BPP_SUPPORT
|
||||||
} else {
|
} else {
|
||||||
unsigned char c = RGB_TO_VDI(colour);
|
unsigned char c = RGB_TO_VDI(colour);
|
||||||
self->plotter->plot_mfdb( self->plotter, loc, &tmp, c, PLOT_FLAG_TRANS );
|
self->plotter->plot_mfdb( self->plotter, loc, &tmp, c, PLOT_FLAG_TRANS );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,15 +240,19 @@ static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t leng
|
|||||||
d += rowsize;
|
d += rowsize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef WITH_8BPP_SUPPORT
|
||||||
if( app.nplanes > 8 ){
|
if( app.nplanes > 8 ){
|
||||||
|
#endif
|
||||||
unsigned short out[4];
|
unsigned short out[4];
|
||||||
rgb_to_vdi1000( (unsigned char*)&fstyle->foreground, (unsigned short*)&out );
|
rgb_to_vdi1000( (unsigned char*)&fstyle->foreground, (unsigned short*)&out );
|
||||||
vs_color( self->plotter->vdi_handle, OFFSET_CUSTOM_COLOR, (unsigned short*)&out[0] );
|
vs_color( self->plotter->vdi_handle, OFFSET_CUSTOM_COLOR, (unsigned short*)&out[0] );
|
||||||
self->plotter->plot_mfdb( self->plotter, &loc, &tmp, OFFSET_CUSTOM_COLOR, PLOT_FLAG_TRANS );
|
self->plotter->plot_mfdb( self->plotter, &loc, &tmp, OFFSET_CUSTOM_COLOR, PLOT_FLAG_TRANS );
|
||||||
|
#ifdef WITH_8BPP_SUPPORT
|
||||||
} else {
|
} else {
|
||||||
unsigned char c = RGB_TO_VDI(fstyle->foreground);
|
unsigned char c = RGB_TO_VDI(fstyle->foreground);
|
||||||
self->plotter->plot_mfdb( self->plotter, &loc, &tmp, c, PLOT_FLAG_TRANS );
|
self->plotter->plot_mfdb( self->plotter, &loc, &tmp, c, PLOT_FLAG_TRANS );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
free(buffer);
|
free(buffer);
|
||||||
|
@ -145,7 +145,11 @@ int ctor_plotter_vdi(GEM_PLOTTER self )
|
|||||||
self->path = path;
|
self->path = path;
|
||||||
self->bitmap = bitmap;
|
self->bitmap = bitmap;
|
||||||
self->bitmap_resize = bitmap_resize;
|
self->bitmap_resize = bitmap_resize;
|
||||||
|
#ifdef WITH_8BPP_SUPPORT
|
||||||
self->bitmap_convert =(app.nplanes > 8) ? bitmap_convert : bitmap_convert_8;
|
self->bitmap_convert =(app.nplanes > 8) ? bitmap_convert : bitmap_convert_8;
|
||||||
|
#else
|
||||||
|
self->bitmap_convert = bitmap_convert;
|
||||||
|
#endif
|
||||||
//self->bitmap_convert =bitmap_convert;
|
//self->bitmap_convert =bitmap_convert;
|
||||||
self->plot_mfdb = plot_mfdb;
|
self->plot_mfdb = plot_mfdb;
|
||||||
self->text = text;
|
self->text = text;
|
||||||
@ -261,10 +265,11 @@ static int dtor( GEM_PLOTTER self )
|
|||||||
free( self->fbuf[i].mem );
|
free( self->fbuf[i].mem );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_8BPP_SUPPORT
|
||||||
for( i=OFFSET_WEB_PAL; i<OFFSET_CUST_PAL+16; i++){
|
for( i=OFFSET_WEB_PAL; i<OFFSET_CUST_PAL+16; i++){
|
||||||
vs_color( self->vdi_handle, i, &sys_pal[i][0] );
|
vs_color( self->vdi_handle, i, &sys_pal[i][0] );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* close Hermes stuff: */
|
/* close Hermes stuff: */
|
||||||
Hermes_ConverterReturn( hermes_cnv_h );
|
Hermes_ConverterReturn( hermes_cnv_h );
|
||||||
@ -1031,6 +1036,7 @@ inline unsigned char get_stdpx(MFDB * dst, int wdplanesz, int x, int y )
|
|||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_8BPP_SUPPORT
|
||||||
static int bitmap_convert_8( GEM_PLOTTER self,
|
static int bitmap_convert_8( GEM_PLOTTER self,
|
||||||
struct bitmap * img,
|
struct bitmap * img,
|
||||||
int x,
|
int x,
|
||||||
@ -1211,6 +1217,7 @@ static int bitmap_convert_8( GEM_PLOTTER self,
|
|||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* convert bitmap to the virutal (chunked) framebuffer format */
|
/* convert bitmap to the virutal (chunked) framebuffer format */
|
||||||
static int bitmap_convert( GEM_PLOTTER self,
|
static int bitmap_convert( GEM_PLOTTER self,
|
||||||
|
Loading…
Reference in New Issue
Block a user