public void Reset(RootGraphic rootgfx) { List <InvalidateGfxArgs> invList = _invList; for (int i = invList.Count - 1; i >= 0; --i) { //release back to pool BubbleInvalidater.ReleaseInvalidateGfxArgs(invList[i]); } invList.Clear(); AccumRect = Rectangle.Empty; }
public override sealed void SetViewport(int viewportLeft, int viewportTop) { int diffLeft = viewportLeft - _viewportLeft; int diffTop = viewportTop - _viewportTop; if (diffLeft != 0 || diffTop != 0) { _viewportLeft = viewportLeft; _viewportTop = viewportTop; // if (!this.BlockGraphicUpdateBubble) { InvalidateGfxArgs args = BubbleInvalidater.GetInvalidateGfxArgs(); args.SetReason_ChangeViewport(this, diffLeft, diffTop); this.InvalidateGraphics(args); } } }
public void SetUpdatePlanForFlushAccum() { //create accumulative plan //merge consecutive RenderElement.WaitForStartRenderElement = false; List <InvalidateGfxArgs> accumQueue = RootGraphic.GetAccumInvalidateGfxArgsQueue(_rootgfx); int j = accumQueue.Count; if (j == 0) { return; } else if (j > 10) //??? { //default (original) mode System.Diagnostics.Debug.WriteLine("traditional: " + j); for (int i = 0; i < j; ++i) { BubbleInvalidater.ReleaseInvalidateGfxArgs(accumQueue[i]); } } else { #if DEBUG if (j == 2) { } System.Diagnostics.Debug.WriteLine("flush accum:" + j); //-------------- //>>preview for debug if (RenderElement.dbugUpdateTrackingCount > 0) { throw new System.NotSupportedException(); } //for (int i = 0; i < j; ++i) //{ // InvalidateGfxArgs a = accumQueue[i]; // RenderElement srcE = a.SrcRenderElement; // if (srcE.NoClipOrBgIsNotOpaque) // { // srcE = FindFirstClipedOrOpaqueParent(srcE); // if (srcE == null) // { // throw new System.NotSupportedException(); // } // } // if (srcE.IsBubbleGfxUpdateTrackedTip) // { // } //} //<<preview for debug //-------------- #endif for (int i = 0; i < j; ++i) { InvalidateGfxArgs a = accumQueue[i]; RenderElement srcE = a.SrcRenderElement; if (srcE.NoClipOrBgIsNotOpaque) { srcE = FindFirstClipedOrOpaqueParent(srcE); } a.StartOn = srcE; AddToNearestRegion(a); } } accumQueue.Clear(); }
protected static void InternalBubbleup(InvalidateGfxArgs args) => BubbleInvalidater.InternalBubbleUpInvalidateGraphicArea(args);
protected static void ReleaseInvalidateGfxArgs(InvalidateGfxArgs args) => BubbleInvalidater.ReleaseInvalidateGfxArgs(args);
//--- protected static InvalidateGfxArgs GetInvalidateGfxArgs() => BubbleInvalidater.GetInvalidateGfxArgs();