| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
It's a source of confusion and possibly bugs to reuse the same variable
name for multiple things.
|
|
|
|
|
|
|
|
|
| |
These are often more readable as they avoid a lot of the boilerplate of
iterating over fixed arrays or STL containers.
Note that this change is very conservative to avoid noise in "git
blame". Only loops where this is a clear improvement have been
converted.
|
|
|
|
|
| |
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
|
|
|
|
|
|
|
|
| |
These files don't use anything from this header, so remove the include.
This exposes some missing includes in other places, though. So add an
explicit include in the files that were relying on an indirect
inclusion.
|
|
|
|
|
|
| |
We mostly use classical C strings, but the memory management around them
can get confusing and error prone. Let's use std::string for the cases
where we need to return a newly allocated string.
|
|
|
|
|
|
| |
The generally recommended way is to include it from source files, not
headers. We had a mix of both. Let's try to be consistent and follow the
recommended way.
|
|
|
|
|
| |
Can be helpful to see what encodings were actually used during a
connection, and how they performed.
|
|
|
|
| |
Gives a bit more context where this error happened.
|
|
|
|
|
| |
Single CPU machines are extremely rare now, so let's avoid the hassle of
multiple code paths.
|
|
|
|
|
|
|
|
|
|
| |
Major restructuring of how streams work. Neither input nor output
streams are now blocking. This avoids stalling the rest of the client or
server when a peer is slow or unresponsive.
Note that this puts an extra burden on users of streams to make sure
they are allowed to do their work once the underlying transports are
ready (e.g. monitoring fds).
|
|
|
|
| |
We need to be able to tell this exception came from a decoder.
|
|
|
|
|
|
| |
We need to track different things in the server and client, so
separate things to two independent structures to keep things more
clear.
|
|
|
|
|
| |
We use polymorphic exception objects, so catching by value invokes
the copy constructor and stuff that we don't really want.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
They just end up burning CPU fighting each other without much
improvement to the decoding time beyond four threads.
|
| |
|
|
|
|
|
|
| |
We can start creating more decoding threads now that we handle
rect ordering properly. No point in creating more threads than
there are CPUs though.
|
|
|
|
|
|
| |
Some encodings only cause dependencies between rects some of the
time. Make sure we can allow parallel decoding of those rect that
aren't dependent on each other.
|
|
|
|
|
| |
Some encodings must be handled in the order they are received.
Make sure we respect this in the decode manager.
|
| |
|
|
|
|
|
|
|
| |
This implements the basic infrastructure for multi-threaded
decoding of rects. However there is just one thread reading data
and one thread decoding it. More logic is needed to safely decode
multiple rects at the same time.
|
|
|
|
|
|
|
|
| |
We need to split these steps up in preparation for multi-core
support. Reading needs to be done in a serial manner, whilst
decoding can be done in parallel.
This also involved a rather large cleanup of the Tight decoder.
|
| |
|
|
Done in preparation for multi-core decoding. Keeps the complexity
out of the other classes. This also moves ownership of the
framebuffer in to CConnection. It's the CConnection object that is
aware of the threads and how to synchronise with them. Therefore
the ownership of the framebuffer must also be there to make sure
it isn't deleted whilst threads are working.
|