Esempio n. 1
0
            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;
            }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
 protected static void ReleaseInvalidateGfxArgs(InvalidateGfxArgs args) => BubbleInvalidater.ReleaseInvalidateGfxArgs(args);