comparison libvo/vo_dga.c @ 1150:8682a16321db

- doublebuffering now can be switched on and off with the -(no)double switch. Default in libvo is disabled.
author acki2
date Sun, 17 Jun 2001 20:59:39 +0000
parents 83919c1b9924
children 4bf4e057c82e
comparison
equal deleted inserted replaced
1149:6a0f937b52e6 1150:8682a16321db
21 * BGR_32_24_888 21 * BGR_32_24_888
22 * 22 *
23 * - works only on x86 architectures 23 * - works only on x86 architectures
24 * 24 *
25 * $Log$ 25 * $Log$
26 * Revision 1.24 2001/06/17 20:59:39 acki2
27 * - doublebuffering now can be switched on and off with the -(no)double switch.
28 * Default in libvo is disabled.
29 *
26 * Revision 1.23 2001/05/24 20:48:45 arpi_esp 30 * Revision 1.23 2001/05/24 20:48:45 arpi_esp
27 * removed redundant osd.h includes 31 * removed redundant osd.h includes
28 * 32 *
29 * Revision 1.22 2001/05/07 19:16:04 acki2 33 * Revision 1.22 2001/05/07 19:16:04 acki2
30 * - now chooses mode with highest ymax (enables doublebuffering in some cases 34 * - now chooses mode with highest ymax (enables doublebuffering in some cases
274 #endif 278 #endif
275 279
276 280
277 extern int verbose; 281 extern int verbose;
278 extern int vo_dbpp; 282 extern int vo_dbpp;
283 extern int vo_doublebuffering;
279 284
280 static int vo_dga_src_format; 285 static int vo_dga_src_format;
281 static int vo_dga_width; // bytes per line in framebuffer 286 static int vo_dga_width; // bytes per line in framebuffer
282 static int vo_dga_vp_width; // visible pixels per line in 287 static int vo_dga_vp_width; // visible pixels per line in
283 // framebuffer 288 // framebuffer
497 502
498 #include "sub.h" 503 #include "sub.h"
499 504
500 static void flip_page( void ){ 505 static void flip_page( void ){
501 506
502 vo_draw_text(vo_dga_src_width,vo_dga_src_height,draw_alpha);
503
504 if(vo_dga_dbf_mem_offset != 0){ 507 if(vo_dga_dbf_mem_offset != 0){
508 vo_draw_text(vo_dga_src_width,vo_dga_src_height,draw_alpha);
505 509
506 #ifdef HAVE_DGA2 510 #ifdef HAVE_DGA2
507 XDGASetViewport (vo_dga_dpy, XDefaultScreen(vo_dga_dpy), 511 XDGASetViewport (vo_dga_dpy, XDefaultScreen(vo_dga_dpy),
508 0, vo_dga_dbf_current * vo_dga_dbf_y_offset, 512 0, vo_dga_dbf_current * vo_dga_dbf_y_offset,
509 XDGAFlipRetrace); 513 XDGAFlipRetrace);
1032 // note: set vo_dga_dbf_mem_offset to NULL to disable doublebuffering 1036 // note: set vo_dga_dbf_mem_offset to NULL to disable doublebuffering
1033 1037
1034 vo_dga_dbf_y_offset = y_off + vo_dga_src_height; 1038 vo_dga_dbf_y_offset = y_off + vo_dga_src_height;
1035 vo_dga_dbf_mem_offset = vo_dga_width * HW_MODE.vdm_bytespp * vo_dga_dbf_y_offset; 1039 vo_dga_dbf_mem_offset = vo_dga_width * HW_MODE.vdm_bytespp * vo_dga_dbf_y_offset;
1036 vo_dga_dbf_current = 0; 1040 vo_dga_dbf_current = 0;
1041
1042
1043 if(!vo_doublebuffering) vo_dga_dbf_mem_offset = NULL;
1037 1044
1038 // if(format ==IMGFMT_YV12 ) 1045 // if(format ==IMGFMT_YV12 )
1039 //vo_dga_dbf_mem_offset = 0; 1046 //vo_dga_dbf_mem_offset = 0;
1040 // disable doublebuffering for YV12 1047 // disable doublebuffering for YV12
1041 1048