diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-01-30 17:57:27 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-07 14:50:29 +0200 |
commit | 2e5a10608394186fd1324c97b17d7f08e0c0aaf6 (patch) | |
tree | bdd76744f7d2d68bceb9b662c7ab85478510cdd7 /unix/x0vncserver | |
parent | ff9eb5a949f7af0198db8c563a7d9d735ad083c3 (diff) | |
download | tigervnc-2e5a10608394186fd1324c97b17d7f08e0c0aaf6.tar.gz tigervnc-2e5a10608394186fd1324c97b17d7f08e0c0aaf6.zip |
Get rid of getStride()
It was confusing and not properly used everywhere.
Callers should use the stride they get when they get
the buffer pointer.
Diffstat (limited to 'unix/x0vncserver')
-rw-r--r-- | unix/x0vncserver/XPixelBuffer.cxx | 5 | ||||
-rw-r--r-- | unix/x0vncserver/XPixelBuffer.h | 6 |
2 files changed, 2 insertions, 9 deletions
diff --git a/unix/x0vncserver/XPixelBuffer.cxx b/unix/x0vncserver/XPixelBuffer.cxx index f88eda49..f4641825 100644 --- a/unix/x0vncserver/XPixelBuffer.cxx +++ b/unix/x0vncserver/XPixelBuffer.cxx @@ -35,8 +35,7 @@ XPixelBuffer::XPixelBuffer(Display *dpy, ImageFactory &factory, m_dpy(dpy), m_image(factory.newImage(dpy, rect.width(), rect.height())), m_offsetLeft(rect.tl.x), - m_offsetTop(rect.tl.y), - m_stride(0) + m_offsetTop(rect.tl.y) { // Fill in the PixelFormat structure of the parent class. format = PixelFormat(m_image->xim->bits_per_pixel, @@ -57,7 +56,7 @@ XPixelBuffer::XPixelBuffer(Display *dpy, ImageFactory &factory, // Calculate the distance in pixels between two subsequent scan // lines of the framebuffer. This may differ from image width. - m_stride = m_image->xim->bytes_per_line * 8 / m_image->xim->bits_per_pixel; + stride = m_image->xim->bytes_per_line * 8 / m_image->xim->bits_per_pixel; // Get initial screen image from the X display. m_image->get(DefaultRootWindow(m_dpy), m_offsetLeft, m_offsetTop); diff --git a/unix/x0vncserver/XPixelBuffer.h b/unix/x0vncserver/XPixelBuffer.h index ab4f88e5..da031615 100644 --- a/unix/x0vncserver/XPixelBuffer.h +++ b/unix/x0vncserver/XPixelBuffer.h @@ -46,9 +46,6 @@ public: // Detect changed pixels, notify the server. inline void poll(VNCServer *server) { m_poller->poll(server); } - // Override PixelBuffer::getStride(). - virtual int getStride() const { return m_stride; } - // Override PixelBuffer::grabRegion(). virtual void grabRegion(const rfb::Region& region); @@ -60,9 +57,6 @@ protected: int m_offsetLeft; int m_offsetTop; - // The number of pixels in a row, with padding included. - int m_stride; - // Copy pixels from the screen to the pixel buffer, // for the specified rectangular area of the buffer. inline void grabRect(const Rect &r) { |