Skip to content

Commit

Permalink
#3592 remove uncompressed 'premult_argb32' icon format
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 22, 2022
1 parent e65f351 commit 38ae052
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion xpra/client/mixins/encodings.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def get_cursor_encodings(self):
return e

def get_window_icon_encodings(self):
e = ["premult_argb32", "BGRA", "default"]
e = ["BGRA", "default"]
if "png" in self.get_core_encodings():
e.append("png")
return e
Expand Down
6 changes: 1 addition & 5 deletions xpra/client/mixins/window_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,7 @@ def _window_icon_image(self, wid, width, height, coding, data):
rowstride = width*4
img = Image.frombytes("RGBA", (width,height), memoryview_to_bytes(data), "raw", "BGRA", rowstride, 1)
has_alpha = True
elif coding in ("BGRA", "premult_argb32"):
if coding == "premult_argb32":
#we usually cannot do in-place and this is not performance critical
from xpra.codecs.argb.argb import unpremultiply_argb #@UnresolvedImport
data = unpremultiply_argb(data)
elif coding in ("BGRA", ):
rowstride = width*4
img = Image.frombytes("RGBA", (width,height), memoryview_to_bytes(data), "raw", "BGRA", rowstride, 1)
has_alpha = True
Expand Down
4 changes: 2 additions & 2 deletions xpra/server/source/encodings_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def init_state(self):
self.encodings = () #all the encodings supported by the client
self.core_encodings = ()
self.encodings_packet = False #supports delayed encodings initialization?
self.window_icon_encodings = ["premult_argb32"]
self.window_icon_encodings = []
self.rgb_formats = ("RGB",)
self.encoding_options = typedict()
self.icons_encoding_options = typedict()
Expand Down Expand Up @@ -281,7 +281,7 @@ def parse_batch_int(value, varname):
send_ui = getattr(self, "ui_client", True) and getattr(self, "send_windows", True)
if send_ui and not self.core_encodings:
raise ClientException("client failed to specify any supported encodings")
self.window_icon_encodings = c.strtupleget("encodings.window-icon", ("premult_argb32",))
self.window_icon_encodings = c.strtupleget("encodings.window-icon", ())
#try both spellings for older versions:
for x in ("encodings", "encoding",):
self.rgb_formats = c.strtupleget(x+".rgb_formats", self.rgb_formats)
Expand Down

0 comments on commit 38ae052

Please sign in to comment.