Skip to content

Commit

Permalink
PIL and webp can send us rgb32 data without setting the "rgb_format" …
Browse files Browse the repository at this point in the history
…option, in this case assume the format is the default RGB(A)

git-svn-id: https://xpra.org/svn/Xpra/trunk@4881 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 8, 2013
1 parent 80e5067 commit 8a68f98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/xpra/client/gl/gl_window_backing.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,20 +366,20 @@ def _do_paint_rgb(self, bpp, img_data, x, y, width, height, rowstride, options,

self.gl_marker("RGB%s update at %d,%d, size %d,%d, stride is %d, row length %d, alignment %d" % (bpp, x, y, width, height, rowstride, row_length, alignment))
# Upload data as temporary RGB texture
rgb_format = options.get("rgb_format", "RGB")
rgb_format = options.get("rgb_format", None)
log.info("options=%s, rgb format=%s", options, rgb_format)
if bpp==24:
if rgb_format=="BGR":
pformat = GL_BGR
else:
assert rgb_format=="RGB"
assert rgb_format in ("RGB", None), "invalid 24-bit format: %s" % rgb_format
pformat = GL_RGB
else:
assert bpp==32
if rgb_format=="BGRA":
pformat = GL_BGRA
else:
assert rgb_format=="RGBA"
assert rgb_format in ("RGBA", None), "invalid 32-bit format: %s" % rgb_format
pformat = GL_RGBA

glBindTexture(GL_TEXTURE_RECTANGLE_ARB, self.textures[TEX_RGB])
Expand Down

0 comments on commit 8a68f98

Please sign in to comment.