aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/PlatformPixelBuffer.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Provide correct dimensions for XShm setupPierre Ossman2019-12-301-3/+3
| | | | | | Since 53f913a we initialize the underlying PixelBuffer with 0x0 dimensions, which means we need to keep more explicit track of what we are trying to allocate in the setup methods.
* Encapsulate PixelBuffer internal detailsPierre Ossman2019-11-151-5/+4
| | | | | | Don't allow subclasses to just override dimensions or buffer details directly and instead force them to go via methods. This allows us to do sanity checks on the new values and catch bugs and attacks.
* Don't use un-initialized stride to base constructorPierre Ossman2019-03-251-1/+1
| | | | | We can use a dummy value here as we set up the buffer and stride further down in the constructor.
* Save a few X11 server roundtrips by ignoring empty damage regions.Christian Authmann2018-11-111-0/+3
| | | | Logging revealed that a few empty damage regions are emitted on startup. Those don't need to be rendered to the Surface pixmap.
* Prevent rendering uninitialized Pixmap contents on X11Christian Authmann2018-11-111-0/+3
| | | | | The Pixmap is filled in as updates from the server arrive. Before the first full update, it would contain undefined contents, which would be rendered onto the ViewPort. Clearing the Pixmap is only done on startup and when changing the server resolution, so it's not performance critical.
* Fix rendering on big endian systemPierre Ossman2018-10-251-7/+2
| | | | | | Our XRender code assumes a certain pixel layout which was not guaranteed on big endian systems. The previous workaround only worked for some cases, so fix this properly now.
* Do not perform endianness check on Windows and AppleJan Grulich2018-08-081-1/+6
|
* Check endianness when constructing PlatformPixelBuffer()Jan Grulich2018-08-081-2/+2
|
* Be more restrictive with shared memory mode bitsPierre Ossman2017-03-291-1/+1
| | | | Everyone else seems to get by with using 0600, so let's do the same.
* Avoid leaking shared memory via X serverPierre Ossman2017-03-291-0/+1
| | | | | It's not enough that we detach from the shared memory, we must also tell the X server to do so for it to be freed properly.
* Abstract platform rendering to "surfaces"Pierre Ossman2017-02-101-5/+161
| | | | This will allow us to render more things than just the framebuffer.
* Do explict sync after XShmPutImage()Pierre Ossman2017-01-111-5/+0
| | | | | The complex logic waiting for events didn't result in any added performance, so use the simpler approach.
* Throttle overlapping screen updatesPierre Ossman2015-11-271-0/+5
| | | | | We need to make sure the display server has finished reading our previous update before we overwrite the buffer with the next update.
* Protect PlatformPixelBuffer from simultaneous accessPierre Ossman2015-11-271-0/+4
| | | | | The damage tracking region needs to be protected from multiple threads accessing it at once. The rest should be fine though.
* Use PixelBuffer objects as the interface for encoders and decodersPierre Ossman2014-07-141-0/+16
| | | | | | | This avoid a lot of unnecessary middle men. This also pushes the responsibility for pixel format conversion into the encoders and decoders. The new bufferFromBuffer() is used for direct conversion, rather than PixelTransformer/TransImageGetter.
* Get rid of getStride()Pierre Ossman2014-07-071-2/+2
| | | | | | It was confusing and not properly used everywhere. Callers should use the stride they get when they get the buffer pointer.
* Create a proper interface base class for the viewport's framebufferPierre Ossman2014-07-071-0/+26
This allows us to gracefully fall back to the FLTK code in case the platform specific code cannot be used.