Skip to content

Commit

Permalink
when the newstride value is non-zero, we want to force a restride, ie…
Browse files Browse the repository at this point in the history
…: from freeze()

git-svn-id: https://xpra.org/svn/Xpra/trunk@11462 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 22, 2015
1 parent 132b89a commit 20c8ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xpra/x11/bindings/ximage.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ cdef class XImageWrapper:
cdef int size = self.rowstride*self.height
#is it worth re-striding to save space:
#(save at least 1KB and 10%)
if newstride==0 and size-newsize<1024 or newsize*110/100>size:
if newstride==0 and (size-newsize<1024 or newsize*110/100>size):
log("restride(%s) not enough savings with stride=%s: size=%s, newsize=%s", newstride, rowstride, size, newsize)
return False
#Note: we could also change the pixel format whilst we're at it
Expand Down

0 comments on commit 20c8ebe

Please sign in to comment.