Skip to content

Commit

Permalink
fix radeon: ensure we flush to see things on screen,
Browse files Browse the repository at this point in the history
also ensure drawable is initialized in case we get an expose event early

git-svn-id: https://xpra.org/svn/Xpra/trunk@2336 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Dec 24, 2012
1 parent 3fe8c11 commit d69495c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/xpra/gl/gl_window_backing.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __init__(self, wid, w, h, mmap_enabled, mmap):
self.yuv_shader = None
self.pixel_format = None
self.size = 0, 0
self.drawable = None

def init(self, w, h):
#also init the pixmap as backup:
Expand Down Expand Up @@ -133,6 +134,7 @@ def _do_paint_rgb24(self, img_data, x, y, width, height, rowstride, options, cal
glTexCoord2i(rx, ry)
glVertex2i(rx, ry)
glEnd()
glFlush()

def do_video_paint(self, coding, img_data, x, y, width, height, options, callbacks):
log("do_video_paint: options=%s, decoder=%s", options, type(self._video_decoder))
Expand Down Expand Up @@ -214,6 +216,7 @@ def update_texture_yuv(self, img_data, x, y, width, height, rowstrides, pixel_fo
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, self.textures[index])
glPixelStorei(GL_UNPACK_ROW_LENGTH, rowstrides[index])
glTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, x, y, width/div, height/div, GL_LUMINANCE, GL_UNSIGNED_BYTE, img_data[index])
glFlush()

def render_image(self, rx, ry, rw, rh):
log("render_image %sx%s at %sx%s pixel_format=%s", rw, rh, rx, ry, self.pixel_format)
Expand All @@ -229,3 +232,4 @@ def render_image(self, rx, ry, rw, rh):
glMultiTexCoord2i(texture, x/div, y/div)
glVertex2i(x, y)
glEnd()
glFlush()

0 comments on commit d69495c

Please sign in to comment.