From: jpbruyere Date: Thu, 4 Feb 2016 18:05:51 +0000 (+0100) Subject: prevent children of uncached group to register for drawing (thats not saving so much... X-Git-Tag: 0.3~66 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=7b8929e00f83ea8d5d176605ed7074a58f94cd86;p=jp%2Fcrow.git prevent children of uncached group to register for drawing (thats not saving so much time) --- 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); }