public ManagedSurface LoadFromFile(StorageFile file, Size size, LoadTimeEffectHandler handler) { ManagedSurface surface = new ManagedSurface(CreateSurface(size)); var ignored = surface.Draw(_graphicsDevice, _drawingLock, new BitmapDrawer(file, handler)); return(surface); }
public ManagedSurface LoadFromSoftwareBitmap(SoftwareBitmap softwareBitmap, Size size, LoadTimeEffectHandler handler) { ManagedSurface surface = new ManagedSurface(CreateSurface(size)); var ignored = surface.Draw(_graphicsDevice, _drawingLock, new BitmapDrawer(softwareBitmap, handler)); return(surface); }
public void UnregisterSurface(ManagedSurface surface) { _deviceReplacedEvent -= surface.OnDeviceReplaced; }