[MPlayer-cvslog] CVS: main/libvo x11_common.c, 1.189, 1.190 x11_common.h, 1.40, 1.41
Ivan Kalvachev CVS
syncmail at mplayerhq.hu
Sun Apr 10 18:02:31 CEST 2005
CVS change done by Ivan Kalvachev CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv14027
Modified Files:
x11_common.c x11_common.h
Log Message:
fix vo_xv_draw_colorkey to a workable state
(using panscan makes x,y negative, so it is very bad idea they to be unsigned)
Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- x11_common.c 20 Feb 2005 22:58:55 -0000 1.189
+++ x11_common.c 10 Apr 2005 16:02:28 -0000 1.190
@@ -2444,12 +2444,14 @@
* It also draws the black bars ( when the video doesn't fit to the
* display in full screen ) seperately, so they don't overlap with the
* video area.
+ * It doesn't call XFlush
*
*/
-inline void vo_xv_draw_colorkey( uint32_t x, uint32_t y,
- uint32_t w, uint32_t h )
+inline void vo_xv_draw_colorkey( int32_t x, int32_t y,
+ int32_t w, int32_t h )
{
- if( xv_ck_info.method == CK_METHOD_MANUALFILL )
+ if( xv_ck_info.method == CK_METHOD_MANUALFILL ||
+ xv_ck_info.method == CK_METHOD_BACKGROUND )//less tearing than XClearWindow()
{
XSetForeground( mDisplay, vo_gc, xv_colorkey );
XFillRectangle( mDisplay, vo_window, vo_gc,
@@ -2458,28 +2460,28 @@
}
/* draw black bars if needed */
+ /* TODO! move this to vo_x11_clearwindow_part() */
if ( vo_fs )
{
XSetForeground( mDisplay, vo_gc, 0 );
+ /* making non overlap fills, requiare 8 checks instead of 4*/
if ( y > 0 )
XFillRectangle( mDisplay, vo_window, vo_gc,
0, 0,
vo_screenwidth, y);
if (x > 0)
XFillRectangle( mDisplay, vo_window, vo_gc,
- 0, y,
- x, h );
+ 0, 0,
+ x, vo_screenheight);
if (x + w < vo_screenwidth)
XFillRectangle( mDisplay, vo_window, vo_gc,
- x + w, y,
- vo_screenwidth - (x + w), h );
+ x + w, 0,
+ vo_screenwidth, vo_screenheight);
if (y + h < vo_screenheight)
XFillRectangle( mDisplay, vo_window, vo_gc,
0, y + h,
- vo_screenwidth, vo_screenheight - (y + h) );
+ vo_screenwidth, vo_screenheight);
}
-
- XFlush( mDisplay );
}
/** \brief tests if a valid arg for the ck suboption was given */
Index: x11_common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- x11_common.h 1 Mar 2005 22:54:24 -0000 1.40
+++ x11_common.h 10 Apr 2005 16:02:28 -0000 1.41
@@ -104,8 +104,7 @@
extern unsigned long xv_colorkey;
extern int vo_xv_init_colorkey();
-extern void vo_xv_colorkey(uint32_t x,uint32_t y, uint32_t w, uint32_t h);
-extern void vo_xv_draw_colorkey(uint32_t x, uint32_t y, uint32_t w, uint32_t h);
+extern void vo_xv_draw_colorkey(int32_t x, int32_t y, int32_t w, int32_t h);
extern void xv_setup_colorkeyhandling(char const * ck_method_str, char const * ck_str);
/*** test functions for common suboptions ***/
More information about the MPlayer-cvslog
mailing list