protected void Swap() { SwapMutex.WaitOne(); byte[] tmp = ActiveSurface; ActiveSurface = DecodingSurface; DecodingSurface = tmp; SwapMutex.ReleaseMutex(); }
protected void UpdateSurface() { if (LoadedFrame != DecodedFrame) { SwapMutex.WaitOne(); Root.Instance.UserInterface.Renderer.UpdateTexture(Id, ActiveSurface); LoadedFrame = DecodedFrame; SwapMutex.ReleaseMutex(); } }