Skip to content

Commit

Permalink
#422: change new context detection and tell us what has changed
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@5154 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 9, 2014
1 parent 6adbd72 commit 78a4c60
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/xpra/codecs/csc_opencl/colorspace_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,16 @@ def get_work_sizes(self, wwidth, wheight):


def convert_image(self, image, retry=0):
global context, program
if self.do_convert_image==None:
raise Exception("not initialized!")
if self.context!=context or self.program!=program:
log.info("using new OpenCL context")
if self.context is not context:
debug("old context=%s, new context=%s", self.context, context)
log.info("using new OpenCL context (context changed)")
self.init_with_device()
elif self.program is not program:
debug("old program=%s, new program=%s", self.program, program)
log.info("using new OpenCL context (program changed)")
self.init_with_device()
try:
return self.do_convert_image(image)
Expand Down

0 comments on commit 78a4c60

Please sign in to comment.