Author: lewing
Date: 2007-12-04 12:18:17 -0500 (Tue, 04 Dec 2007)
New Revision: 90701
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/media.cpp
Log:
2007-12-04 Larry Ewing <[EMAIL PROTECTED]>
* media.cpp (Image::Render): fix the conditions for the opacity
stability count.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-12-04 17:07:30 UTC (rev 90700)
+++ trunk/moon/src/ChangeLog 2007-12-04 17:18:17 UTC (rev 90701)
@@ -1,3 +1,8 @@
+2007-12-04 Larry Ewing <[EMAIL PROTECTED]>
+
+ * media.cpp (Image::Render): fix the conditions for the opacity
+ stability count.
+
2007-12-03 Larry Ewing <[EMAIL PROTECTED]>
* src/media.cpp (Image::Render): use paint_with_alpha if opacity
Modified: trunk/moon/src/media.cpp
===================================================================
--- trunk/moon/src/media.cpp 2007-12-04 17:07:30 UTC (rev 90700)
+++ trunk/moon/src/media.cpp 2007-12-04 17:18:17 UTC (rev 90701)
@@ -1456,6 +1456,8 @@
if (render_opacity != pattern_opacity) {
opacity_stability_count = 0;
pattern_opacity = render_opacity;
+ cairo_pattern_destroy (pattern);
+ pattern = NULL;
} else {
opacity_stability_count ++;
if (opacity_stability_count >= OPACITY_STABILITY_MAX) {
@@ -1479,7 +1481,10 @@
// If the pattern holds a temporary surface that meets
our needs use it.
// It is safe to assume if the pattern is there that it
is the right size
// because changing the source will invalidate the
cached surface.
-
+ //
+ // NOTE: the opacity stability check above means this
case is essentially
+ // never encountered it is left here future where we
may use a different
+ // method of testing for animated properties.
if (surface->cairo != dest && opacity < 1.0) {
//g_warning ("sharing (%f, %f)", opacity,
pattern_opacity);
cairo_t *temp = cairo_create (dest);
@@ -1502,7 +1507,8 @@
pattern = image_brush_create_pattern (cr,
surface->cairo, surface->width, surface->height, opacity);
}
- pattern_opacity = opacity;
+ if (opacity_stability_count >= OPACITY_STABILITY_MAX)
+ pattern_opacity = opacity;
}
cairo_matrix_t matrix;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches