summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_opengl.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-11-24 16:11:02 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-11-24 16:11:02 +0000
commit8440a8229a5db4a8a61456a9b07b5e5d44777ea5 (patch)
tree0009e41ddf917a570a0bc0e5a7a807991a9abce0 /src/video_out/video_out_opengl.c
parentc9842da649c0a56c999791b033782a59ec2fd7ce (diff)
downloadxine-lib-8440a8229a5db4a8a61456a9b07b5e5d44777ea5.tar.gz
xine-lib-8440a8229a5db4a8a61456a9b07b5e5d44777ea5.tar.bz2
patch to further improve overlay blending and to elimiate static variables
in alphablend.c; XShm subtitles work now, Xv works as well, other output plugins untested CVS patchset: 7156 CVS date: 2004/11/24 16:11:02
Diffstat (limited to 'src/video_out/video_out_opengl.c')
-rw-r--r--src/video_out/video_out_opengl.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c
index c440002e3..8b3f11e18 100644
--- a/src/video_out/video_out_opengl.c
+++ b/src/video_out/video_out_opengl.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_opengl.c,v 1.42 2004/11/23 15:01:23 mshopf Exp $
+ * $Id: video_out_opengl.c,v 1.43 2004/11/24 16:11:04 mroi Exp $
*
* video_out_opengl.c, OpenGL based interface for xine
*
@@ -114,6 +114,7 @@ typedef struct {
vo_driver_t vo_driver;
vo_scale_t sc;
+ alphablend_t alphablend_extra_data;
/* X11 related stuff */
Display *display;
@@ -950,13 +951,15 @@ static void opengl_overlay_blend (vo_driver_t *this_gen,
opengl_overlay_clut_yuv2rgb (this, overlay, frame);
# if BYTES_PER_PIXEL == 3
- blend_rgb24 ((uint8_t *)frame->rgb, overlay,
- frame->width, frame->height,
- frame->width, frame->height);
+ blend_rgb24 ((uint8_t *)frame->texture, overlay,
+ frame->width, frame->height,
+ frame->width, frame->height,
+ &this->alphablend_extra_data);
# elif BYTES_PER_PIXEL == 4
- blend_rgb32 ((uint8_t *)frame->rgb, overlay,
- frame->width, frame->height,
- frame->width, frame->height);
+ blend_rgb32 ((uint8_t *)frame->texture, overlay,
+ frame->width, frame->height,
+ frame->width, frame->height,
+ &this->alphablend_extra_data);
# else
# error "bad BYTES_PER_PIXEL"
# endif
@@ -1256,6 +1259,8 @@ static void opengl_dispose (vo_driver_t *this_gen) {
XUnlockDisplay (this->display);
}
+ _x_alphablend_free(&this->alphablend_extra_data);
+
free (this);
}
@@ -1295,6 +1300,8 @@ static vo_driver_t *opengl_open_plugin (video_driver_class_t *class_gen, const v
this->sc.user_data = visual->user_data;
this->sc.user_ratio = XINE_VO_ASPECT_AUTO;
+ _x_alphablend_init (&this->alphablend_extra_data, class->xine);
+
this->drawable = visual->d;
this->gui_width = this->gui_height = -1;
this->last_width = this->last_height = -1;
@@ -1368,7 +1375,7 @@ static vo_driver_t *opengl_open_plugin (video_driver_class_t *class_gen, const v
_("enable double buffering"),
_("For OpenGL double buffering does not only remove tearing artifacts,\n"
"it also reduces flickering a lot.\n"
- " It should not have any performance impact."),
+ "It should not have any performance impact."),
20, NULL, NULL);
pthread_mutex_init (&this->render_action_mutex, NULL);