diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2004-02-28 15:09:01 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2004-02-28 15:09:01 +0000 |
commit | 76f704fdae2180df8ece7b1faac2622a4bb43135 (patch) | |
tree | e3f16c81e493c2161fc0c24dc4083a7c0ba2e862 | |
parent | 7b05577fdbca9916f7b88c41bf8b04be741b56a2 (diff) | |
download | xine-lib-76f704fdae2180df8ece7b1faac2622a4bb43135.tar.gz xine-lib-76f704fdae2180df8ece7b1faac2622a4bb43135.tar.bz2 |
- Do not repaint the whole video output area in black when an expose event s raised. This reduce flickering when resizing/moving the output window (and it's a bit faster).
- Recompute output coordinates before repainting the output window, it fixes some errors when resizing the xine logo.
CVS patchset: 6189
CVS date: 2004/02/28 15:09:01
-rw-r--r-- | src/video_out/video_out_xv.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 318465904..a12b912b0 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.189 2003/12/30 02:14:07 miguelfreitas Exp $ + * $Id: video_out_xv.c,v 1.190 2004/02/28 15:09:01 tmattern Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -565,10 +565,19 @@ static void xv_deinterlace_frame (xv_driver_t *this) { } static void xv_clean_output_area (xv_driver_t *this) { + int i; + XLockDisplay (this->display); + XSetForeground (this->display, this->gc, this->black.pixel); - XFillRectangle(this->display, this->drawable, this->gc, - this->sc.gui_x, this->sc.gui_y, this->sc.gui_width, this->sc.gui_height); + + for( i = 0; i < 4; i++ ) { + if( this->sc.border[i].w && this->sc.border[i].h ) { + XFillRectangle(this->display, this->drawable, this->gc, + this->sc.border[i].x, this->sc.border[i].y, + this->sc.border[i].w, this->sc.border[i].h); + } + } if (this->use_colorkey) { XSetForeground (this->display, this->gc, this->colorkey); @@ -914,7 +923,8 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, /* XExposeEvent * xev = (XExposeEvent *) data; */ if (this->cur_frame) { - int i; + + xv_redraw_needed (this_gen); XLockDisplay (this->display); @@ -934,18 +944,9 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, this->sc.output_width, this->sc.output_height); } - XSetForeground (this->display, this->gc, this->black.pixel); - - for( i = 0; i < 4; i++ ) { - if( this->sc.border[i].w && this->sc.border[i].h ) - XFillRectangle(this->display, this->drawable, this->gc, - this->sc.border[i].x, this->sc.border[i].y, - this->sc.border[i].w, this->sc.border[i].h); - } - if(this->xoverlay) - x11osd_expose(this->xoverlay); - + x11osd_expose(this->xoverlay); + XSync(this->display, False); XUnlockDisplay (this->display); } |