summaryrefslogtreecommitdiffstats
path: root/common/rfb/tightDecode.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2009-03-31 14:06:53 +0000
committerPierre Ossman <ossman@cendio.se>2009-03-31 14:06:53 +0000
commit19501b8e23ec152bf883ef52bccfa978df4a245b (patch)
treeafe9de9dce72d80b23d59617ddac9879e6206b38 /common/rfb/tightDecode.h
parenteed5d1f7f11628f8656320adae8f3c38b45ee74f (diff)
downloadtigervnc-19501b8e23ec152bf883ef52bccfa978df4a245b.tar.gz
tigervnc-19501b8e23ec152bf883ef52bccfa978df4a245b.zip
Optimise the common pixel format conversion RGB24 to RGB32.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3730 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/tightDecode.h')
-rw-r--r--common/rfb/tightDecode.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/common/rfb/tightDecode.h b/common/rfb/tightDecode.h
index 9cf234d0..9679dd78 100644
--- a/common/rfb/tightDecode.h
+++ b/common/rfb/tightDecode.h
@@ -267,10 +267,8 @@ DecompressJpegRect(const Rect& r, rdr::InStream* is,
break;
}
- for (int dx = 0; dx < r.width(); dx++) {
- *pixelPtr++ =
- myFormat.pixelFromRGB(scanline[dx*3], scanline[dx*3+1], scanline[dx*3+2]);
- }
+ myFormat.bufferFromRGB((rdr::U8*)pixelPtr, (const rdr::U8*)scanline, r.width());
+ pixelPtr += r.width();
}
IMAGE_RECT(r, buf);