Ejemplo n.º 1
0
 public void Dispose()
 {
     foreach (var child in Children)
     {
         child.Dispose();
     }
     _drawOperationsRefCounter?.Dispose();
 }
Ejemplo n.º 2
0
        public void Dispose()
        {
            _drawOperationsRefCounter?.Dispose();

            _children?.Dispose();

            Disposed = true;
        }
Ejemplo n.º 3
0
 public void Dispose()
 {
     using (_egl.PrimaryEglContext.EnsureLocked())
     {
         _window?.Dispose();
         _window = null;
     }
 }
Ejemplo n.º 4
0
        private void RenderOverlay(Scene scene, IDrawingContextImpl parentContent)
        {
            if (DrawDirtyRects)
            {
                var overlay = GetOverlay(parentContent, scene.Size, scene.Scaling);

                using (var context = overlay.Item.CreateDrawingContext(this))
                {
                    context.Clear(Colors.Transparent);
                    RenderDirtyRects(context);
                }
            }
            else
            {
                _overlay?.Dispose();
                _overlay = null;
            }
        }
Ejemplo n.º 5
0
        private void EnsureDrawOperationsCreated()
        {
            if (_drawOperations == null)
            {
                _drawOperations           = new List <IRef <IDrawOperation> >();
                _drawOperationsRefCounter = RefCountable.Create(CreateDisposeDrawOperations(_drawOperations));
                _drawOperationsCloned     = false;
            }
            else if (_drawOperationsCloned)
            {
                var oldDrawOperations = _drawOperations;

                _drawOperations = new List <IRef <IDrawOperation> >(oldDrawOperations.Count);

                foreach (var drawOperation in oldDrawOperations)
                {
                    _drawOperations.Add(drawOperation.Clone());
                }

                _drawOperationsRefCounter?.Dispose();
                _drawOperationsRefCounter = RefCountable.Create(CreateDisposeDrawOperations(_drawOperations));
                _drawOperationsCloned     = false;
            }
        }
Ejemplo n.º 6
0
 private void EnsureDrawOperationsCreated()
 {
     if (_drawOperations == null)
     {
         _drawOperations           = new List <IRef <IDrawOperation> >();
         _drawOperationsRefCounter = RefCountable.Create(Disposable.Create(DisposeDrawOperations));
         _drawOperationsCloned     = false;
     }
     else if (_drawOperationsCloned)
     {
         _drawOperations = new List <IRef <IDrawOperation> >(_drawOperations.Select(op => op.Clone()));
         _drawOperationsRefCounter.Dispose();
         _drawOperationsRefCounter = RefCountable.Create(Disposable.Create(DisposeDrawOperations));
         _drawOperationsCloned     = false;
     }
 }
Ejemplo n.º 7
0
 public void Dispose()
 {
     _drawOperationsRefCounter?.Dispose();
 }