Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* add docstring so we don't break things again in the future
* always verify that the freeze() call has succeeded

git-svn-id: https://xpra.org/svn/Xpra/trunk@11463 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 22, 2015
1 parent 20c8ebe commit e1906be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xpra/server/window/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,11 +1294,12 @@ def process_damage_region(self, damage_time, window, x, y, w, h, coding, options
else:
#schedule encode via queue, after freezing the pixels:
frozen = image.freeze()
assert frozen, "failed to freeze %s" % image
self.encode_queue.append(item)
l = len(self.encode_queue)
if l>=self.encode_queue_max_size:
av_delay = 0 #we must free some space!
avsynclog("scheduling encode queue iteration in %ims, pixels frozen=%s, encode queue size=%i (max=%i)", av_delay, frozen, l, self.encode_queue_max_size)
avsynclog("scheduling encode queue iteration in %ims, encode queue size=%i (max=%i)", av_delay, l, self.encode_queue_max_size)
self.timeout_add(av_delay, self.call_in_encode_thread, self.encode_from_queue)

def encode_from_queue(self):
Expand Down
2 changes: 2 additions & 0 deletions src/xpra/x11/bindings/ximage.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ cdef class XImageWrapper:

def restride(self, const int newstride=0):
#NOTE: this must be called from the UI thread!
#passing in a non-zero value must do a restride,
#only the default value of 0 may or may not restride
cdef int rowstride = newstride
if newstride==0:
#if not given a newstride, assume it is optional and check if it is worth doing at all:
Expand Down

0 comments on commit e1906be

Please sign in to comment.