Author: toshok
Date: 2007-08-21 16:11:07 -0400 (Tue, 21 Aug 2007)
New Revision: 84584
Modified:
branches/moon-delayed-rendering/src/ChangeLog
branches/moon-delayed-rendering/src/dirty.cpp
branches/moon-delayed-rendering/src/uielement.cpp
Log:
* uielement.cpp (DoRender): short-circuit rendering of uielements
when their opacity is 0.
* dirty.cpp (process_dirty_elements): handle controls.
2007-08-21 Chris Toshok <[EMAIL PROTECTED]>
Modified: branches/moon-delayed-rendering/src/ChangeLog
===================================================================
--- branches/moon-delayed-rendering/src/ChangeLog 2007-08-21 19:56:22 UTC
(rev 84583)
+++ branches/moon-delayed-rendering/src/ChangeLog 2007-08-21 20:11:07 UTC
(rev 84584)
@@ -1,5 +1,12 @@
2007-08-21 Chris Toshok <[EMAIL PROTECTED]>
+ * uielement.cpp (DoRender): short-circuit rendering of uielements
+ when their opacity is 0.
+
+ * dirty.cpp (process_dirty_elements): handle controls.
+
+2007-08-21 Chris Toshok <[EMAIL PROTECTED]>
+
* shape.h: add Shape::ComputeBoundsSlow, which uses the slow
(cairo_*_extents) codepath for computing bounds. Use this path
for polygons, polylines, and paths. Implement a Line-specific
Modified: branches/moon-delayed-rendering/src/dirty.cpp
===================================================================
--- branches/moon-delayed-rendering/src/dirty.cpp 2007-08-21 19:56:22 UTC
(rev 84583)
+++ branches/moon-delayed-rendering/src/dirty.cpp 2007-08-21 20:11:07 UTC
(rev 84584)
@@ -8,6 +8,7 @@
#include "uielement.h"
#include "panel.h"
+#include "control.h"
#include "collection.h"
#include "runtime.h"
#include "clock.h"
@@ -83,6 +84,11 @@
n = (Collection::Node *) n->Next ();
}
}
+ else if (el->Is (Type::CONTROL)) {
+ Control *c = (Control*)el;
+ if (c->real_object)
+ add_dirty_element (c->real_object,
DirtyTransform);
+ }
}
if (el->dirty_flags & DirtyOpacity) {
@@ -101,6 +107,11 @@
n = (Collection::Node *) n->Next ();
}
}
+ else if (el->Is (Type::CONTROL)) {
+ Control *c = (Control*)el;
+ if (c->real_object)
+ c->real_object->UpdateTotalOpacity();
+ }
}
if (!(el->dirty_flags & DownDirtyState)) {
Modified: branches/moon-delayed-rendering/src/uielement.cpp
===================================================================
--- branches/moon-delayed-rendering/src/uielement.cpp 2007-08-21 19:56:22 UTC
(rev 84583)
+++ branches/moon-delayed-rendering/src/uielement.cpp 2007-08-21 20:11:07 UTC
(rev 84584)
@@ -384,6 +384,8 @@
void
UIElement::DoRender (cairo_t *cr, int x, int y, int width, int height)
{
+ if (total_opacity == 0.0)
+ return;
cairo_pattern_t *mask = NULL;
STARTTIMER (UIElement_render, Type::Find (GetObjectType())->name);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches