public ILockedFramebuffer Lock() { // if(_deferredRendering) // { // var w = _savedLogicalSize.Width * _savedScaling; // var h = _savedLogicalSize.Height * _savedScaling; // var dpi = _savedScaling * 96; // return new DeferredFramebuffer(cb => // { // lock (_syncRoot) // { // if (_native == null) // return false; // cb(_native); // _lastRenderedLogicalSize = _savedLogicalSize; // return true; // } // }, (int)w, (int)h, new Vector(dpi, dpi)); //} return(new FramebufferWrapper(_native.GetSoftwareFramebuffer())); }
public ILockedFramebuffer Lock() { if (_deferredRendering) { var w = _savedLogicalSize.Width * _savedScaling; var h = _savedLogicalSize.Height * _savedScaling; var dpi = _savedScaling * 96; return(new DeferredFramebuffer(cb => { lock (_syncRoot) { if (_native == null) { return false; } cb(_native); _lastRenderedLogicalSize = _savedLogicalSize; return true; } }, (int)w, (int)h, new Vector(dpi, dpi))); } return(new FramebufferWrapper(_native.GetSoftwareFramebuffer())); }