Small ScaledPixelBuffer class code improvements.
Rename scaled_rect to changed_rect.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@505 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfb/ScaledPixelBuffer.cxx b/rfb/ScaledPixelBuffer.cxx
index b2304ff..61f81e2 100644
--- a/rfb/ScaledPixelBuffer.cxx
+++ b/rfb/ScaledPixelBuffer.cxx
@@ -87,19 +87,19 @@
static double c1_sub_dx, c1_sub_dy;
static double dx, dy;
static int i, j;
- static Rect scaled_rect;
+ static Rect changed_rect;
- // Calculate the scale boundaries
- scaled_rect = calculateScaleBoundary(r);
+ // Calculate the changed pixel rect in the scaled image
+ changed_rect = calculateScaleBoundary(r);
// Scale the source rect to the destination image buffer using
// bilinear interplation
- for (int y = scaled_rect.tl.y; y < scaled_rect.br.y; y++) {
+ for (int y = changed_rect.tl.y; y < changed_rect.br.y; y++) {
j = (int)(dy = y / scale_ratio);
dy -= j;
c1_sub_dy = 1 - dy;
- for (int x = scaled_rect.tl.x; x < scaled_rect.br.x; x++) {
+ for (int x = changed_rect.tl.x; x < changed_rect.br.x; x++) {
ptr = &scaled_data[(x + y*scaled_width) * 4];
i = (int)(dx = x / scale_ratio);