Skip to content

Commit

Permalink
fix delta compression:
Browse files Browse the repository at this point in the history
* use actual width instead of rowstride to calculate size of area (though we still xor the whole thing..)
* skip narrow regions (anything less than 2 pixels wide or high)

git-svn-id: https://xpra.org/svn/Xpra/trunk@8284 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 25, 2014
1 parent 0164d6e commit 8ef289a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xpra/server/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,8 @@ def make_data_packet(self, damage_time, process_damage_time, wid, image, coding,
#if client supports delta pre-compression for this encoding, use it if we can:
delta = -1
store = -1
if DELTA and not (self._mmap and self._mmap_size>0) and (coding in self.supports_delta) and self.min_delta_size<image.get_size()<self.max_delta_size:
isize = image.get_width() * image.get_height()
if DELTA and w>2 and h>2 and not (self._mmap and self._mmap_size>0) and (coding in self.supports_delta) and self.min_delta_size<isize<self.max_delta_size:
#we need to copy the pixels because some delta encodings
#will modify the pixel array in-place!
dpixels = image.get_pixels()[:]
Expand Down

0 comments on commit 8ef289a

Please sign in to comment.