Ticket #229: gl-decode-in-UI-thread.patch
File gl-decode-in-UI-thread.patch, 1.5 KB (added by , 8 years ago) |
---|
-
xpra/gl/gl_window_backing.py
147 147 self.glarea.window.draw_rgb_image(gc, x, y, width, height, gdk.RGB_DITHER_NONE, img_data, rowstride) 148 148 149 149 def do_video_paint(self, coding, img_data, x, y, w, h, options, callbacks): 150 gobject.idle_add(self.UI_do_video_paint, coding, img_data, x, y, w, h, options, callbacks) 151 152 def UI_do_video_paint(self, coding, img_data, x, y, w, h, options, callbacks): 150 153 debug("do_video_paint: options=%s, decoder=%s", options, type(self._video_decoder)) 151 154 err, rowstrides, img_data = self._video_decoder.decompress_image_to_yuv(img_data, options) 152 155 csc_pixel_format = options.get("csc_pixel_format", -1) … … 156 159 if not success: 157 160 log.error("do_video_paint: %s decompression error %s on %s bytes of picture data for %sx%s pixels, options=%s", 158 161 coding, err, len(img_data), w, h, options) 159 gobject.idle_add(fire_paint_callbacks,callbacks, False)162 fire_paint_callbacks(callbacks, False) 160 163 return 161 gobject.idle_add(self.do_gl_paint,x, y, w, h, img_data, rowstrides, pixel_format, callbacks)164 self.do_gl_paint(x, y, w, h, img_data, rowstrides, pixel_format, callbacks) 162 165 163 166 def do_gl_paint(self, x, y, w, h, img_data, rowstrides, pixel_format, callbacks): 164 167 #this function runs in the UI thread, no video_decoder lock held