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/vncviewer/X11PixelBuffer.cxx b/vncviewer/X11PixelBuffer.cxx
index 3675eb5..c709984 100644
--- a/vncviewer/X11PixelBuffer.cxx
+++ b/vncviewer/X11PixelBuffer.cxx
@@ -94,7 +94,7 @@
}
X11PixelBuffer::X11PixelBuffer(int width, int height) :
- PlatformPixelBuffer(display_pf(), width, height, NULL),
+ PlatformPixelBuffer(display_pf(), width, height, NULL, 0),
shminfo(NULL), xim(NULL)
{
// Might not be open at this point
@@ -110,6 +110,7 @@
}
data = (rdr::U8*)xim->data;
+ stride = xim->bytes_per_line / (getPF().bpp/8);
}
@@ -139,11 +140,6 @@
}
-int X11PixelBuffer::getStride() const
-{
- return xim->bytes_per_line / (getPF().bpp/8);
-}
-
static bool caughtError;
static int XShmAttachErrorHandler(Display *dpy, XErrorEvent *error)