Exemple #1
0
        public Frame CreateFrame()
        {
            lock (_Frame) {
                if (_FrameInUse)
                {
                    throw new InvalidOperationException("A frame is already in use");
                }

                _FrameInUse = true;
                CollectAllocators();
                _Frame.Initialize(this, PickFrameIndex());
                return(_Frame);
            }
        }
Exemple #2
0
        public Frame CreateFrame(RenderCoordinator coordinator)
        {
            lock (_FrameLock) {
                /*
                 * if (_FrameInUse)
                 *  throw new InvalidOperationException("A frame is already in use");
                 *
                 * _FrameInUse = true;
                 * CollectAllocators();
                 */

                // UGH
                if (!_FrameInUse)
                {
                    CollectAllocators();
                }
                _FrameInUse = true;
                _Frame      = _ReusableFrame ?? new Frame();
                _Frame.Initialize(coordinator, this, PickFrameIndex());
                return(_Frame);
            }
        }