Author: lewing
Date: 2008-01-16 15:12:47 -0500 (Wed, 16 Jan 2008)
New Revision: 93094
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/uielement.cpp
Log:
2008-01-16 Larry Ewing <[EMAIL PROTECTED]>
* uielement.cpp (UIElement::DoRender): make sure we don't reset
the coordinate system when setting up the clip calls in the
opacity and opacity mask cases. Go back to using the brush
directly when rendering masks. Should speed things up a little
and fixes http://mycomix.wintellect.com/Spotlight.aspx?Item=1041
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2008-01-16 20:05:05 UTC (rev 93093)
+++ trunk/moon/src/ChangeLog 2008-01-16 20:12:47 UTC (rev 93094)
@@ -1,3 +1,11 @@
+2008-01-16 Larry Ewing <[EMAIL PROTECTED]>
+
+ * uielement.cpp (UIElement::DoRender): make sure we don't reset
+ the coordinate system when setting up the clip calls in the
+ opacity and opacity mask cases. Go back to using the brush
+ directly when rendering masks. Should speed things up a little
+ and fixes http://mycomix.wintellect.com/Spotlight.aspx?Item=1041
+
2008-01-16 Chris Toshok <[EMAIL PROTECTED]>
* stylus.h, stylus.cpp: a few changes. Move the
Modified: trunk/moon/src/uielement.cpp
===================================================================
--- trunk/moon/src/uielement.cpp 2008-01-16 20:05:05 UTC (rev 93093)
+++ trunk/moon/src/uielement.cpp 2008-01-16 20:12:47 UTC (rev 93094)
@@ -538,16 +538,19 @@
STARTTIMER (UIElement_render, Type::Find (GetObjectType())->name);
cairo_save (cr);
+ cairo_set_matrix (cr, &absolute_xform);
RenderClipPath (cr);
if (opacityMask || IS_TRANSLUCENT (total_opacity)) {
Rect r = GetSubtreeBounds ();
r.RoundOut ();
+ cairo_save (cr);
cairo_identity_matrix (cr);
runtime_cairo_region (cr, region->gdkregion);
cairo_clip (cr);
cairo_rectangle (cr, r.x, r.y, r.w, r.h);
cairo_clip (cr);
+ cairo_restore (cr);
}
if (IS_TRANSLUCENT (total_opacity))
@@ -555,20 +558,21 @@
if (opacityMask != NULL) {
cairo_push_group (cr);
- cairo_set_matrix (cr, &absolute_xform);
- opacityMask->SetupBrush (cr, this);
- cairo_fill (cr);
- mask = cairo_pop_group (cr);
- cairo_push_group (cr);
}
Render (cr, region);
if (opacityMask != NULL) {
- cairo_pop_group_to_source (cr);
+ cairo_pattern_t *data = cairo_pop_group (cr);
+ opacityMask->SetupBrush (cr, this);
+ mask = cairo_get_source (cr);
+ cairo_pattern_reference (mask);
+ cairo_set_source (cr, data);
cairo_mask (cr, mask);
cairo_pattern_destroy (mask);
+ cairo_pattern_destroy (data);
}
+
if (IS_TRANSLUCENT (total_opacity)) {
cairo_pop_group_to_source (cr);
cairo_paint_with_alpha (cr, total_opacity);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches