Exemplo n.º 1
0
        internal void DiscardDeviceResources()
        {
            DXUtil.Dispose(ref _blur);
            DXUtil.Dispose(ref _warp);

            DXUtil.Dispose(ref _dxgiDevice);
            DXUtil.Dispose(ref _d2dContext);
        }
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         DXUtil.Dispose(ref _effect);
         DXUtil.Dispose(ref _vertexBuffer);
         DXUtil.Dispose(ref _drawInfo);
     }
     base.Dispose(disposing);
 }
 void PrepareForNewImage()
 {
     if (_initialized)
     {
         DXUtil.Dispose(ref _imBmp);
         ClearSavedCopy();
         _savedCopy = _bitmap.Transform();
         UpdateTargetRect();
         Invalidate(false);
     }
 }
        //----------------------------------------------------------------------
        #region ** overridden methods

        protected override void OnResize(EventArgs e)
        {
            if (_initialized)
            {
                DXUtil.Dispose(ref _targetBmp);
                if (_bitmap != null && _bitmap.HasImage)
                {
                    UpdateTargetRect();
                }
            }
            base.OnResize(e);
        }
 void DiscardDeviceResources()
 {
     if (_d2dContext != null)
     {
         DXUtil.Dispose(ref _blur);
         DXUtil.Dispose(ref _warp);
         DXUtil.Dispose(ref _imBmp);
         DXUtil.Dispose(ref _targetBmp);
         _d2dDevice.Dispose();
         _lineBrush.Dispose();
         _d2dContext.Dispose();
         _d2dContext = null;
     }
 }
Exemplo n.º 6
0
 void DiscardDeviceIndependentResources()
 {
     DXUtil.Dispose(ref _d2dFactory);
     DXUtil.Dispose(ref _wicFactory);
 }