summaryrefslogtreecommitdiffstats
path: root/rfb
diff options
context:
space:
mode:
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2006-02-12 07:58:02 +0000
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2006-02-12 07:58:02 +0000
commit461e4b35e4a2257f600aa92eb3569db275246301 (patch)
tree8829f18218a394c7e93ec0180c3e4cee571d554b /rfb
parent7127347bd4457b973a1be5aa56946016551332d2 (diff)
downloadtigervnc-461e4b35e4a2257f600aa92eb3569db275246301.tar.gz
tigervnc-461e4b35e4a2257f600aa92eb3569db275246301.zip
Small ScaledPixelBuffer class improvements.
Now src_data is a pointer to original image buffer. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@485 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'rfb')
-rw-r--r--rfb/ScaledPixelBuffer.cxx4
-rw-r--r--rfb/ScaledPixelBuffer.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/rfb/ScaledPixelBuffer.cxx b/rfb/ScaledPixelBuffer.cxx
index 2e1c0c7e..2aedb829 100644
--- a/rfb/ScaledPixelBuffer.cxx
+++ b/rfb/ScaledPixelBuffer.cxx
@@ -26,7 +26,7 @@
using namespace rdr;
using namespace rfb;
-ScaledPixelBuffer::ScaledPixelBuffer(U8 *src_data_, int src_width_,
+ScaledPixelBuffer::ScaledPixelBuffer(U8 **src_data_, int src_width_,
int src_height_, int scale)
: src_data(src_data_), src_width(src_width_), src_height(src_height_),
bpp(32), scaled_data(0) {
@@ -119,7 +119,7 @@ void ScaledPixelBuffer::scaleRect(const Rect& r) {
dx -= i;
c1_sub_dx = 1 - dx;
- src_ptr = &src_data[(i + (j*src_width))*4];
+ src_ptr = &(*src_data)[(i + (j*src_width))*4];
b0 = *src_ptr; g0 = *(src_ptr+1); r0 = *(src_ptr+2);
if (i+1 < src_width) {
b1 = *(src_ptr+4); g1 = *(src_ptr+5); r1 = *(src_ptr+6);
diff --git a/rfb/ScaledPixelBuffer.h b/rfb/ScaledPixelBuffer.h
index 34e73eea..4051a380 100644
--- a/rfb/ScaledPixelBuffer.h
+++ b/rfb/ScaledPixelBuffer.h
@@ -31,7 +31,7 @@ namespace rfb {
class ScaledPixelBuffer {
public:
- ScaledPixelBuffer(U8 *data, int width, int height, int scale);
+ ScaledPixelBuffer(U8 **data, int width, int height, int scale);
ScaledPixelBuffer();
virtual ~ScaledPixelBuffer();
@@ -75,7 +75,7 @@ namespace rfb {
int src_height;
int bpp;
double scale_ratio;
- U8 *src_data;
+ U8 **src_data;
U8 *scaled_data;
};