private ArraySegment <byte> Render(OutputFrame pixels) { ArraySegment <byte> bytes = _renderService.PreRender(pixels); Interlocked.Add(ref _bytesHandled, (ulong)bytes.Count); Interlocked.Add(ref _pixelsHandled, (ulong)pixels.Pixels.Length); return(bytes); }