aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-02-04 19:05:51 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-02-04 19:05:51 +0100
commit7b8929e00f83ea8d5d176605ed7074a58f94cd86 (patch)
tree0234f06e7a81f885219c9552acd8cbe4ff996631 /src/GraphicObjects/GraphicObject.cs
parenta6779fb9384383891913caf63c00b0c7143be5b7 (diff)
prevent children of uncached group to register for drawing (thats not saving so much time)
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
-rw-r--r--src/GraphicObjects/GraphicObject.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 1a608f36..6fe3a404 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -125,8 +125,6 @@ namespace Crow
Parent.ContextCoordinates (r);// + ClientRectangle.Position;
}
public virtual Rectangle ScreenCoordinates (Rectangle r){
- //r += Slot.Position;
-
return
Parent.ScreenCoordinates(r) + Parent.getSlot().Position + Parent.ClientRectangle.Position;
}
@@ -451,14 +449,19 @@ namespace Crow
public virtual void registerForGraphicUpdate ()
{
bmp = null;
- if (HostContainer != null)
- HostContainer.gobjsToRedraw.Add (this);
+ RegisterForRedraw ();
}
/// <summary>
/// Add clipping region in redraw list of interface, dont update cached object content
/// </summary>
public virtual void RegisterForRedraw ()
{
+ //test if this speed up a lot to cancel clipping for an uncached group
+ Group p = Parent as Group;
+ if (p != null) {
+ if (p.bmp == null)
+ return;
+ }
if (HostContainer != null)
HostContainer.gobjsToRedraw.Add (this);
}