private void CloseDx() { logger.Debug("GDICapture::CloseDx()"); if (renderTarget != null) { renderTarget.Dispose(); renderTarget = null; } if (renderTexture != null) { renderTexture.Dispose(); renderTexture = null; } if (SharedTexture != null) { SharedTexture.Dispose(); SharedTexture = null; } if (gdiTexture != null) { gdiTexture.Dispose(); gdiTexture = null; } if (device != null) { device.Dispose(); device = null; } }
private void DisposeDirectXResources() { _textFormat.Dispose(); _dwFactory.Dispose(); _renderTarget.Dispose(); _renderTargetView.Dispose(); _d2DFactory.Dispose(); _swapChain.Dispose(); _d3DDeviceContext.Dispose(); _d3DDevice.Dispose(); }
public void Dispose() { //d3dFactory.Dispose(); surface.Dispose(); d2dFactory.Dispose(); d2dRenderTarget.Dispose(); d3dDevice.Dispose(); d3dContext.Dispose(); swapChain.Dispose(); target.Dispose(); targetView.Dispose(); }
public IDrawingContextImpl CreateDrawingContext(IVisualBrushRenderer visualBrushRenderer) { _target = _target ?? _externalRenderTargetProvider.CreateRenderTarget(); _externalRenderTargetProvider.BeforeDrawing(); return(new DrawingContextImpl(visualBrushRenderer, _target, _dwFactory, null, () => { try { _externalRenderTargetProvider.AfterDrawing(); } catch (SharpDXException ex) when((uint)ex.HResult == 0x8899000C) // D2DERR_RECREATE_TARGET { _target?.Dispose(); _target = null; } })); }
public void Dispose() { _target?.Dispose(); _target = null; }
public void Dispose() { _renderTarget.Dispose(); }