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.
diff --git a/unix/x0vncserver/XPixelBuffer.cxx b/unix/x0vncserver/XPixelBuffer.cxx
index f88eda4..f464182 100644
--- a/unix/x0vncserver/XPixelBuffer.cxx
+++ b/unix/x0vncserver/XPixelBuffer.cxx
@@ -35,8 +35,7 @@
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 @@
// 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);