Beispiel #1
0
        protected void PrepareFrame(Frame frame)
        {
            if (DoThreadedPrepare)
            {
                Monitor.Enter(PrepareLock);
            }

            CheckMainThread(DoThreadedPrepare);

            try {
                Manager.ResetBufferGenerators();
                frame.Prepare(DoThreadedPrepare);
            } finally {
                if (DoThreadedPrepare)
                {
                    Monitor.Exit(PrepareLock);
                }
            }
        }
        protected void PrepareFrame(Frame frame, bool threaded)
        {
            if (DoThreadedPrepare)
            {
                Monitor.Enter(PrepareLock);
            }

            CheckMainThread(DoThreadedPrepare && threaded);

            try {
                RunBeforePrepareHandlers();
                Manager.ResetBufferGenerators(frame.Index);
                frame.Prepare(DoThreadedPrepare && threaded);
            } finally {
                if (DoThreadedPrepare)
                {
                    Monitor.Exit(PrepareLock);
                }
            }
        }
        protected void PrepareFrame(Frame frame, bool threaded)
        {
            if (DoThreadedPrepare)
            {
                Monitor.Enter(PrepareLock);
            }

            CheckMainThread(DoThreadedPrepare && threaded);

            Squared.Threading.Profiling.Superluminal.BeginEventFormat("Prepare Frame", "SRFrame #{0}", frame.Index, color: 0x10CF10);
            try {
                PrepareStopwatch.Reset();
                PrepareStopwatch.Start();
                Manager.ResetBufferGenerators(frame.Index);
                frame.Prepare(DoThreadedPrepare && threaded);
            } finally {
                PrepareStopwatch.Stop();
                if (DoThreadedPrepare)
                {
                    Monitor.Exit(PrepareLock);
                }
                Squared.Threading.Profiling.Superluminal.EndEvent();
            }
        }