Skip to content

Commit

Permalink
#1232: always call present_fbo to make sure the whole fbo will be rep…
Browse files Browse the repository at this point in the history
…ainted on screen, just also pass the "flush" parameter to ensure we don't actually do it until it's needed (other paint events may still be coming through)

git-svn-id: https://xpra.org/svn/Xpra/trunk@12886 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jun 22, 2016
1 parent 682053d commit 8865956
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/xpra/client/gl/gl_window_backing_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,10 @@ def do_scroll_paints(self, scrolls, flush=0):
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_RECTANGLE_ARB, self.textures[TEX_TMP_FBO], 0)
glDrawBuffer(GL_COLOR_ATTACHMENT1)

#clear the buffer?
#glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, self.texture_pixel_format, bw, bh, 0, self.texture_pixel_format, GL_UNSIGNED_BYTE, None)
#glClear(GL_COLOR_BUFFER_BIT)

for x,y,w,h,ydelta in scrolls:
assert ydelta!=0 and abs(ydelta)<bh, "invalid ydelta value: %i" % ydelta
assert w>0 and h>0
Expand All @@ -492,15 +496,15 @@ def do_scroll_paints(self, scrolls, flush=0):
tmp = self.textures[TEX_FBO]
self.textures[TEX_FBO] = self.textures[TEX_TMP_FBO]
self.textures[TEX_TMP_FBO] = tmp

#restore normal paint state:
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE_ARB, self.textures[TEX_FBO], 0)
glBindFramebuffer(GL_READ_FRAMEBUFFER, self.offscreen_fbo)
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, self.offscreen_fbo)
glBindFramebuffer(GL_FRAMEBUFFER, self.offscreen_fbo)
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE_ARB, self.textures[TEX_FBO], 0)

self.unset_rgb_paint_state()
bw, bh = self.size
if flush==0:
self.present_fbo(0, 0, bw, bh)
self.present_fbo(0, 0, bw, bh, flush)

def set_rgb_paint_state(self):
# Set GL state for RGB painting:
Expand Down

0 comments on commit 8865956

Please sign in to comment.