From 7b8929e00f83ea8d5d176605ed7074a58f94cd86 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Thu, 4 Feb 2016 19:05:51 +0100 Subject: [PATCH] prevent children of uncached group to register for drawing (thats not saving so much time) --- src/GraphicObjects/GraphicObject.cs | 11 +++++++---- 1 file 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 (); } /// /// Add clipping region in redraw list of interface, dont update cached object content /// 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); } -- 2.47.3