Author: lewing
Date: 2007-09-21 17:38:42 -0400 (Fri, 21 Sep 2007)
New Revision: 86181
Modified:
trunk/moon/src/media.cpp
Log:
2007-09-21 Larry Ewing <[EMAIL PROTECTED]>
* src/media.cpp (MediaElement::Render): Don't create a temporary
surface and do a copy for every frame when opacity < 1.0. Just
render it once.
Modified: trunk/moon/src/media.cpp
===================================================================
--- trunk/moon/src/media.cpp 2007-09-21 21:10:58 UTC (rev 86180)
+++ trunk/moon/src/media.cpp 2007-09-21 21:38:42 UTC (rev 86181)
@@ -301,7 +301,7 @@
cairo_set_matrix (cr, &absolute_xform);
- pattern = image_brush_create_pattern (cr, surface, mplayer->width,
mplayer->height, opacity);
+ pattern = image_brush_create_pattern (cr, surface, mplayer->width,
mplayer->height, 1.0);
if (recalculate_matrix) {
image_brush_compute_pattern_matrix (&matrix, w, h,
mplayer->width, mplayer->height, stretch,
@@ -318,7 +318,12 @@
cairo_rectangle (cr, 0, 0, w, h);
cairo_close_path (cr);
- cairo_fill (cr);
+ if (opacity < 1.0) {
+ cairo_clip (cr);
+ cairo_paint_with_alpha (cr, opacity);
+ } else {
+ cairo_fill (cr);
+ }
cairo_restore (cr);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches