Skip to content

Commit

Permalink
fix gl backing: add stub for alpha channel handling
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@3371 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 13, 2013
1 parent 80ae816 commit aafa076
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/xpra/client/gl/gl_client_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ def new_backing(self, w, h):
debug("GL new_backing(%s, %s)", w, h)
w = max(2, w)
h = max(2, h)
has_alpha = self._metadata.get("has-alpha", False)
lock = None
if self._backing:
lock = self._backing._video_decoder_lock
try:
if lock:
lock.acquire()
if self._backing is None:
self._backing = self.gl_pixmap_backing_class(self._id, w, h)
self._backing = self.gl_pixmap_backing_class(self._id, w, h, has_alpha)
if self._client.supports_mmap:
self._backing.enable_mmap(self._client.mmap)
self._backing.init(w, h)
Expand Down
4 changes: 2 additions & 2 deletions src/xpra/client/gl/gl_window_backing.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def py_gl_debug_callback(source, error_type, error_id, severity, length, message
"""
class GLPixmapBacking(GTK2WindowBacking):

def __init__(self, wid, w, h):
GTK2WindowBacking.__init__(self, wid, w, h)
def __init__(self, wid, w, h, has_alpha):
GTK2WindowBacking.__init__(self, wid, w, h, has_alpha)
display_mode = get_DISPLAY_MODE()
try:
self.glconfig = gtk.gdkgl.Config(mode=display_mode)
Expand Down

0 comments on commit aafa076

Please sign in to comment.