Ejemplo n.º 1
0
 def get_core_encodings(self):
     encodings = GTKXpraClient.get_core_encodings(self)
     if gdk.screen_get_default().get_rgba_visual() is not None:
         try:
             #check for bytearray which is used by PixmapBacking
             #to unpremultiply rgb32 data
             bytearray("")
             from xpra.codecs.argb.argb import unpremultiply_argb_in_place
             assert unpremultiply_argb_in_place
             encodings.append("rgb32")
         except:
             pass
     #gtk2 can handle 'png' and 'jpeg' natively (without PIL)
     #(though using PIL is better since we can do that in the decode thread)
     for x in ("png", "jpeg"):
         if x not in encodings:
             encodings.append(x)
     return encodings