xpra icon
Bug tracker and wiki

Opened 3 weeks ago

Closed 10 days ago

Last modified 20 hours ago

#2466 closed defect (fixed)

GTK3 OpenGL win32 window is transparent

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: blocker Milestone: 4.0
Component: platforms Version: 3.0.x
Keywords: Cc:

Description (last modified by Antoine Martin)

Like it's not getting painted at all.

Tried 2.5.3 and 3.0.x on a win7 system with a Quadro M4000.

The code was originally added in r16993 + r16964, see ticket:1569#comment:5.

See also:

  • #1569 python3 opengl client
  • #1682 transparency with the native opengl backend on win32

Attachments (1)

gtkglarea.patch (4.3 KB) - added by Antoine Martin 3 weeks ago.
try to use Gtk.GLArea

Download all attachments as: .zip

Change History (12)

comment:1 Changed 3 weeks ago by Antoine Martin

Description: modified (diff)
Status: newassigned

comment:2 Changed 3 weeks ago by Antoine Martin

Using v3.0.1-r24295, and just showing an xterm:

  • python2 client:
    2019-10-29 20:15:09,820 process_new_common: wid=1, OR=False, geometry([276, 60, 489, 292])=(276, 60, 489, 292) / (489, 292)
    2019-10-29 20:15:09,823 init_formats() texture pixel format=RGB, internal format=RGB8, rgb modes=['YUV420P', 'YUV422P', 'YUV444P', 'GBRP', 'BGRA', 'BGRX', 'RGBA', 'RGBX', 'RGB', 'BGR']
    2019-10-29 20:15:09,823 new_backing(489, 292)=<gtk.DrawingArea object at 0x2922b0f0 (GtkDrawingArea at 0x7ef5620)>
    2019-10-29 20:15:09,824 setup_window() position=(276, 60), set_initial_position=False, OR=False, decorated=True
    2019-10-29 20:15:09,824 setup_window() window frame sizes={'caption': 33, 'minimum': (194, 55), 'menu-bar': 30, 'normal': (11, 11), 'frame': (11, 11, 44, 11), 'fixed': (3, 3), 'border': 1, 'offset': (11, 44)}
    2019-10-29 20:15:09,824 setup_window() adjusted initial position=(265, 16)
    2019-10-29 20:15:09,826 set_size_constraints({'base-size': (19, 4), 'gravity': 1, 'increment': (6, 13), 'minimum-size': (194, 55)}, (32767, 32767))
    2019-10-29 20:15:09,826 intpair(maximum-size)=None
    2019-10-29 20:15:09,827 intpair(minimum-size)=(194, 55)
    2019-10-29 20:15:09,827 intpair(base-size)=(19, 4)
    2019-10-29 20:15:09,827 intpair(increment)=(6, 13)
    2019-10-29 20:15:09,827 modified hints for max window size (32767, 32767): {'width_inc': 6, 'height_inc': 13, 'min_height': 55, 'base_width': 19, 'min_width': 194, 'base_height': 4} (rw=0, rh=3) -> max=32767x32764
    2019-10-29 20:15:09,827 calling: <bound method GLClientWindow.apply_geometry_hints of GLClientWindow(1 : gtk2.GLDrawingArea(1, (489, 292), None))>({'width_inc': 6, 'height_inc': 13, 'max_width': 32767, 'min_height': 55, 'base_width': 19, 'max_height': 32764, 'min_width': 194, 'base_height': 4})
    2019-10-29 20:15:09,845 ChoosePixelFormat for window 0x6a0054 and 8 bpc: 0xf
    2019-10-29 20:15:09,846 DescribePixelFormat: {'accum-size': 64, 'alpha-shift': 0, 'aux-buffers': 4, 'red-size': 8, 'blue-shift': 0, 'red-shift': 16, 'stencil-size': 8, 'green-shift': 8, 'blue-size': 8, 'accum-green-size': 16, 'alpha-size': 0, 'double-buffered': True, 'depth-size': 0, 'green-size': 8, 'accum-red-size': 16, 'depth': 32, 'accum-blue-size': 16, 'rgba': True, 'visible-mask': 0}
    2019-10-29 20:15:09,847 wglCreateContext(0x72011197)=0x20000
    2019-10-29 20:15:09,847 wglMakeCurrent(0x72011197, 0x20000)
    2019-10-29 20:15:09,850 BeginPaint hdc=0xffffffff9d01102e
    2019-10-29 20:15:09,850 GL_MAX_TEXTURE_SIZE=16384
    2019-10-29 20:15:09,851 Texture size GL_MAX_RECTANGLE_TEXTURE_SIZE=16384
    2019-10-29 20:15:09,851 Initializing GL context for window size (489, 292), backing size (489, 292), max texture size=16384
    2019-10-29 20:15:09,852 gtk2.GLDrawingArea(1, (489, 292), None).gl_init_textures() textures: [1 2 3 4 5 6 7], offscreen fbo: 1, tmp fbo: 2
    2019-10-29 20:15:09,856 YUV2RGB shader initialized
    2019-10-29 20:15:09,856 YUV2RGBFULL shader initialized
    2019-10-29 20:15:09,857 RGBP2RGB shader initialized
    2019-10-29 20:15:09,857 gl_init() done
    2019-10-29 20:15:09,857 set_alignment(16, 64, 'RGBA') GL_UNPACK_ROW_LENGTH=0, GL_UNPACK_ALIGNMENT=8
    2019-10-29 20:15:09,859 GL cursor 16x16 uploaded 1024 bytes of RGBA pixel data using zerocopy:bytes-as-memoryview
    2019-10-29 20:15:09,860 EndPaint
    2019-10-29 20:15:09,861 GL do_configure_event(<gtk.gdk.Event at 00000000291d8b70: GDK_CONFIGURE x=276, y=60, width=487, height=290>)
    2019-10-29 20:15:09,861 ['configure-window', 1, 276, 60, 487, 290, {'screen': 0, 'encoding.transparency': False, 'encoding.bit-depth': 24, 'encoding.send-window-size': True, 'encoding.scrolling': True, 'encodings.rgb_formats': ['YUV420P', 'YUV422P', 'YUV444P', 'GBRP', 'BGRA', 'BGRX', 'RGBA', 'RGBX', 'RGB', 'BGR'], 'encoding.full_csc_modes': {u'mpeg1': [u'YUV420P'], u'mpeg2': [u'YUV420P'], u'mpeg4': [u'YUV420P'], u'h264': [u'ARGB', u'BGRA', u'BGRX', u'GBRP', u'RGB', u'XRGB', u'YUV420P', u'YUV422P', u'YUV444P'], u'h265': [u'BGRX', u'GBRP', u'RGB', u'XRGB', u'YUV420P', u'YUV422P', u'YUV444P'], u'vp9': [u'YUV420P', u'YUV444P'], u'vp8': [u'YUV420P'], 'webp': ['BGRA', 'BGRX', 'RGBA', 'RGBX']}}, 0, {}, False]
    2019-10-29 20:15:09,862 configure event: current size=(489, 292), new size=(487, 290), backing=gtk2.GLDrawingArea(1, (489, 292), None), iconified=False
    2019-10-29 20:15:09,862 wglMakeCurrent(0x72011197, 0x20000)
    2019-10-29 20:15:09,862 BeginPaint hdc=0xffffffff9d01102e
    2019-10-29 20:15:09,863 GL_MAX_TEXTURE_SIZE=16384
    2019-10-29 20:15:09,863 Texture size GL_MAX_RECTANGLE_TEXTURE_SIZE=16384
    2019-10-29 20:15:09,863 Initializing GL context for window size (487, 290), backing size (487, 290), max texture size=16384
    2019-10-29 20:15:09,864 gl_init() done
    2019-10-29 20:15:09,866 EndPaint
    2019-10-29 20:15:09,867 GLClientWindow(1 : gtk2.GLDrawingArea(1, (487, 290), None)).window_state_updated(GLClientWindow(1 : gtk2.GLDrawingArea(1, (487, 290), None)), <gtk.gdk.Event at 00000000291ed870: GDK_WINDOW_STATE>) changed_mask=<flags GDK_WINDOW_STATE_WITHDRAWN of type GdkWindowState>, new_window_state=<flags 0 of type GdkWindowState>
    2019-10-29 20:15:09,867 window_state_updated(..) state updates: {}, actual updates: {}, server updates: {}
    2019-10-29 20:15:09,867 GL process_map_event()
    2019-10-29 20:15:09,868 map-window wid=1, geometry=(276, 60, 487, 290), client props={'screen': 0, 'workspace': 65535}, state={'frame': (11, 11, 44, 11)}
    2019-10-29 20:15:09,868 GL do_configure_event(<gtk.gdk.Event at 00000000291d8b70: GDK_CONFIGURE x=276, y=60, width=487, height=290>)
    2019-10-29 20:15:09,869 ['configure-window', 1, 276, 60, 487, 290, {}, 0, {}, False]
    2019-10-29 20:15:09,870 configure event: current size=(487, 290), new size=(487, 290), backing=gtk2.GLDrawingArea(1, (487, 290), None), iconified=False
    2019-10-29 20:15:09,870 configure event: size unchanged, queueing redraw
    2019-10-29 20:15:09,870 wglMakeCurrent(0x72011197, 0x20000)
    2019-10-29 20:15:09,870 BeginPaint hdc=0xffffffff9d01102e
    2019-10-29 20:15:09,871 present_fbo: adding (0, 0, 487, 290) to pending paint list (size=0), flush=0, paint_screen=True
    2019-10-29 20:15:09,871 do_present_fbo: painting ((0, 0, 487, 290),)
    2019-10-29 20:15:09,871 Presenting FBO on screen
    2019-10-29 20:15:09,873 1.do_gl_show(gtk2.GLDrawingArea(1, (487, 290), None)) swapping buffers now
    2019-10-29 20:15:09,873 swap_buffers: calling SwapBuffers(0xffffffff9d01102e)
    2019-10-29 20:15:09,893 gl_show after  69ms took 19ms,  1 updates
    2019-10-29 20:15:09,893 gtk2.GLDrawingArea(1, (487, 290), None).gl_frame_terminator()
    2019-10-29 20:15:09,893 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x00000000072c74d0>(GL_FRAMEBUFFER (36160), 2)
    2019-10-29 20:15:09,894 gtk2.GLDrawingArea(1, (487, 290), None).do_present_fbo() done
    2019-10-29 20:15:09,894 EndPaint
    2019-10-29 20:15:09,908 wglMakeCurrent(0x72011197, 0x20000)
    2019-10-29 20:15:09,908 BeginPaint hdc=0xffffffff9d01102e
    2019-10-29 20:15:09,909 set_alignment(16, 64, 'RGBA') GL_UNPACK_ROW_LENGTH=0, GL_UNPACK_ALIGNMENT=8
    2019-10-29 20:15:09,909 GL cursor 16x16 uploaded 1024 bytes of RGBA pixel data using zerocopy:bytes-as-memoryview
    2019-10-29 20:15:09,909 EndPaint
    2019-10-29 20:15:09,917 wglMakeCurrent(0x72011197, 0x20000)
    2019-10-29 20:15:09,917 BeginPaint hdc=0xffffffff9d01102e
    2019-10-29 20:15:09,918 do_present_fbo: painting ((0, 0, 487, 290),)
    2019-10-29 20:15:09,918 Presenting FBO on screen
    2019-10-29 20:15:09,919 1.do_gl_show(gtk2.GLDrawingArea(1, (487, 290), None)) swapping buffers now
    2019-10-29 20:15:09,919 swap_buffers: calling SwapBuffers(0xffffffff9d01102e)
    2019-10-29 20:15:09,926 gl_show after  33ms took  6ms,  1 updates
    2019-10-29 20:15:09,926 gtk2.GLDrawingArea(1, (487, 290), None).gl_frame_terminator()
    2019-10-29 20:15:09,927 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x00000000072c74d0>(GL_FRAMEBUFFER (36160), 2)
    2019-10-29 20:15:09,927 gtk2.GLDrawingArea(1, (487, 290), None).do_present_fbo() done
    2019-10-29 20:15:09,927 EndPaint
    2019-10-29 20:15:09,945 gtk2.GLDrawingArea(1, (487, 290), None).do_paint_rgb(RGB, 564920 bytes, x=0, y=0, width=487, height=290, rowstride=1948, options={'encoding': 'webp', 'quality': 100, 'window-size': (487, 290), 'rgb_format': u'RGB'})
    2019-10-29 20:15:09,946 wglMakeCurrent(0x72011197, 0x20000)
    2019-10-29 20:15:09,947 BeginPaint hdc=0xffffffff9101119c
    2019-10-29 20:15:09,947 RGB update at (0,0) size 487x290 (564920 bytes), using GL zerocopy:memoryview format=RGB / UNSIGNED_BYTE to internal format=RGB8
    2019-10-29 20:15:09,948 set_alignment(487, 1948, u'RGB') GL_UNPACK_ROW_LENGTH=649, GL_UNPACK_ALIGNMENT=4
    2019-10-29 20:15:09,949 present_fbo: adding (0, 0, 487, 290) to pending paint list (size=0), flush=0, paint_screen=True
    2019-10-29 20:15:09,950 do_present_fbo: painting ((0, 0, 487, 290),)
    2019-10-29 20:15:09,950 Presenting FBO on screen
    2019-10-29 20:15:09,951 1.do_gl_show(gtk2.GLDrawingArea(1, (487, 290), None)) swapping buffers now
    2019-10-29 20:15:09,951 swap_buffers: calling SwapBuffers(0xffffffff9101119c)
    2019-10-29 20:15:09,959 gl_show after  33ms took  8ms,  1 updates
    2019-10-29 20:15:09,960 gtk2.GLDrawingArea(1, (487, 290), None).gl_frame_terminator()
    2019-10-29 20:15:09,961 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x00000000072c74d0>(GL_FRAMEBUFFER (36160), 2)
    2019-10-29 20:15:09,961 gtk2.GLDrawingArea(1, (487, 290), None).do_present_fbo() done
    2019-10-29 20:15:09,961 EndPaint
    2019-10-29 20:15:10,154 gtk2.GLDrawingArea(1, (487, 290), None).do_paint_rgb(RGB, 564920 bytes, x=0, y=0, width=487, height=290, rowstride=1948, options={'encoding': 'webp', 'quality': 100, 'window-size': (487, 290), 'rgb_format': u'RGB'})
    2019-10-29 20:15:10,161 wglMakeCurrent(0x72011197, 0x20000)
    2019-10-29 20:15:10,163 BeginPaint hdc=0x32011246
    2019-10-29 20:15:10,165 RGB update at (0,0) size 487x290 (564920 bytes), using GL zerocopy:memoryview format=RGB / UNSIGNED_BYTE to internal format=RGB8
    2019-10-29 20:15:10,166 set_alignment(487, 1948, u'RGB') GL_UNPACK_ROW_LENGTH=649, GL_UNPACK_ALIGNMENT=4
    2019-10-29 20:15:10,172 present_fbo: adding (0, 0, 487, 290) to pending paint list (size=0), flush=0, paint_screen=True
    2019-10-29 20:15:10,173 do_present_fbo: painting ((0, 0, 487, 290),)
    2019-10-29 20:15:10,174 Presenting FBO on screen
    2019-10-29 20:15:10,176 1.do_gl_show(gtk2.GLDrawingArea(1, (487, 290), None)) swapping buffers now
    2019-10-29 20:15:10,177 swap_buffers: calling SwapBuffers(0x32011246)
    2019-10-29 20:15:10,193 gl_show after 233ms took 17ms,  1 updates
    2019-10-29 20:15:10,195 gtk2.GLDrawingArea(1, (487, 290), None).gl_frame_terminator()
    2019-10-29 20:15:10,196 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x00000000072c74d0>(GL_FRAMEBUFFER (36160), 2)
    2019-10-29 20:15:10,197 gtk2.GLDrawingArea(1, (487, 290), None).do_present_fbo() done
    2019-10-29 20:15:10,197 EndPaint
    
  • python3 client:
    2019-10-29 20:24:41,839 process_new_common: wid=1, OR=False, geometry([276, 60, 487, 290])=(276, 60, 487, 290) / (487, 290)
    2019-10-29 20:24:42,013 init_formats() texture pixel format=RGB, internal format=RGB8, rgb modes=['YUV420P', 'YUV422P', 'YUV444P', 'GBRP', 'BGRA', 'BGRX', 'RGBA', 'RGBX', 'RGB', 'BGR']
    2019-10-29 20:24:42,013 setup_window() position=(276, 60), set_initial_position=False, OR=False, decorated=True
    2019-10-29 20:24:42,014 setup_window() window frame sizes={'normal': (11, 11), 'fixed': (3, 3), 'minimum': (194, 55), 'menu-bar': 30, 'border': 1, 'caption': 33, 'offset': (11, 44), 'frame': (11, 11, 44, 11)}
    2019-10-29 20:24:42,014 setup_window() adjusted initial position=(265, 16)
    2019-10-29 20:24:42,015 set_size_constraints({b'base-size': (19, 4), b'increment': (6, 13), b'gravity': 1, b'minimum-size': (194, 55)}, (32767, 32767))
    2019-10-29 20:24:42,015 intpair(b'maximum-size')=None
    2019-10-29 20:24:42,015 intpair(b'minimum-size')=(194, 55)
    2019-10-29 20:24:42,015 intpair(b'base-size')=(19, 4)
    2019-10-29 20:24:42,015 intpair(b'increment')=(6, 13)
    2019-10-29 20:24:42,016 modified hints for max window size (32767, 32767): {b'min_width': 194, b'min_height': 55, b'base_width': 19, b'base_height': 4, b'width_inc': 6, b'height_inc': 13} (rw=0, rh=3) -> max=32767x32764
    2019-10-29 20:24:42,016 calling: <bound method GTK3ClientWindow.apply_geometry_hints of GLClientWindow(1 : gtk3.GLDrawingArea(1, (487, 290), None))>({b'min_width': 194, b'min_height': 55, b'base_width': 19, b'base_height': 4, b'width_inc': 6, b'height_inc': 13})
    2019-10-29 20:24:42,039 ChoosePixelFormat for window 0x4704fe and 8 bpc: 0xf
    2019-10-29 20:24:42,039 DescribePixelFormat: {'rgba': True, 'depth': 32, 'red-size': 8, 'green-size': 8, 'blue-size': 8, 'alpha-size': 0, 'red-shift': 16, 'green-shift': 8, 'blue-shift': 0, 'alpha-shift': 0, 'accum-red-size': 16, 'accum-green-size': 16, 'accum-blue-size': 16, 'accum-size': 64, 'depth-size': 0, 'stencil-size': 8, 'aux-buffers': 4, 'visible-mask': 0, 'double-buffered': True}
    2019-10-29 20:24:42,040 wglCreateContext(0xffffffffe701115e)=0x20000
    2019-10-29 20:24:42,040 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,042 BeginPaint hdc=0xffffffffe30110e2
    2019-10-29 20:24:42,042 GL_MAX_TEXTURE_SIZE=16384
    2019-10-29 20:24:42,042 Texture size GL_MAX_RECTANGLE_TEXTURE_SIZE=16384
    2019-10-29 20:24:42,042 Initializing GL context for window size (487, 290), backing size (487, 290), max texture size=16384
    
    (Xpra_Audio.exe:3796): GStreamer-WARNING **: 20:24:42.046: Failed to load plugin 'C:\msys64\mingw64\lib\gstreamer-1.0\libgsttwolame.dll': 'C:\msys64\mingw64\lib\gstreamer-1.0\libgsttwolame.dll': The specified procedure could not be found.
    2019-10-29 20:24:42,060 gtk3.GLDrawingArea(1, (487, 290), None).gl_init_textures() textures: [1 2 3 4 5 6 7], offscreen fbo: 1, tmp fbo: 2
    2019-10-29 20:24:42,071 YUV2RGB shader initialized
    2019-10-29 20:24:42,072 YUV2RGBFULL shader initialized
    2019-10-29 20:24:42,072 RGBP2RGB shader initialized
    2019-10-29 20:24:42,072 gl_init() done
    2019-10-29 20:24:42,072 set_alignment(16, 64, 'RGBA') GL_UNPACK_ROW_LENGTH=0, GL_UNPACK_ALIGNMENT=8
    2019-10-29 20:24:42,073 GL cursor 16x16 uploaded 1024 bytes of RGBA pixel data using copy:bytes
    2019-10-29 20:24:42,073 EndPaint
    2019-10-29 20:24:42,079 GL do_configure_event(<Gdk.EventConfigure object at 0x0000000029d40270 (void at 0x0000000013b46290)>)
    2019-10-29 20:24:42,080 ['configure-window', 1, 265, 60, 483, 279, {'encodings.rgb_formats': ['YUV420P', 'YUV422P', 'YUV444P', 'GBRP', 'BGRA', 'BGRX', 'RGBA', 'RGBX', 'RGB', 'BGR'], 'encoding.transparency': False, 'encoding.full_csc_modes': {'h264': ['ARGB', 'BGRA', 'BGRX', 'GBRP', 'RGB', 'XRGB', 'YUV420P', 'YUV422P', 'YUV444P'], 'vp8': ['YUV420P'], 'h265': ['BGRX', 'GBRP', 'RGB', 'XRGB', 'YUV420P', 'YUV422P', 'YUV444P'], 'mpeg4': ['YUV420P'], 'mpeg1': ['YUV420P'], 'mpeg2': ['YUV420P'], 'vp9': ['YUV420P', 'YUV444P'], 'webp': ['BGRA', 'BGRX', 'RGBA', 'RGBX']}, 'encoding.send-window-size': True, 'encoding.scrolling': True, 'encoding.bit-depth': 24}, 0, {}, False]
    2019-10-29 20:24:42,080 configure event: current size=(487, 290), new size=(483, 279), backing=gtk3.GLDrawingArea(1, (487, 290), None), iconified=False
    2019-10-29 20:24:42,081 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,081 BeginPaint hdc=0x7f011241
    2019-10-29 20:24:42,081 GL_MAX_TEXTURE_SIZE=16384
    2019-10-29 20:24:42,081 Texture size GL_MAX_RECTANGLE_TEXTURE_SIZE=16384
    2019-10-29 20:24:42,082 Initializing GL context for window size (483, 279), backing size (483, 279), max texture size=16384
    2019-10-29 20:24:42,082 gl_init() done
    2019-10-29 20:24:42,083 EndPaint
    2019-10-29 20:24:42,084 GLClientWindow(1 : gtk3.GLDrawingArea(1, (483, 279), None)).window_state_updated(GLClientWindow(1 : gtk3.GLDrawingArea(1, (483, 279), None)), <Gdk.EventWindowState object at 0x0000000029d4bc20 (void at 0x0000000013b465b0)>) changed_mask=<flags GDK_WINDOW_STATE_WITHDRAWN | GDK_WINDOW_STATE_FOCUSED of type Gdk.WindowState>, new_window_state=<flags GDK_WINDOW_STATE_FOCUSED of type Gdk.WindowState>
    2019-10-29 20:24:42,085 _focused=True (was False)
    2019-10-29 20:24:42,085 window_state_updated(..) state updates: {'focused': True}, actual updates: {'focused': True}, server updates: {'focused': True}
    2019-10-29 20:24:42,085 GL do_configure_event(<Gdk.EventConfigure object at 0x0000000029d4bc20 (void at 0x0000000013b46330)>)
    2019-10-29 20:24:42,085 ['configure-window', 1, 265, 60, 483, 279, {}, 0, {'focused': True}, False]
    2019-10-29 20:24:42,085 configure event: current size=(483, 279), new size=(483, 279), backing=gtk3.GLDrawingArea(1, (483, 279), None), iconified=False
    2019-10-29 20:24:42,086 configure event: size unchanged, queueing redraw
    2019-10-29 20:24:42,086 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,086 BeginPaint hdc=0x7f011241
    2019-10-29 20:24:42,086 present_fbo: adding (0, 0, 483, 279) to pending paint list (size=0), flush=0, paint_screen=True
    2019-10-29 20:24:42,086 do_present_fbo: painting ((0, 0, 483, 279),)
    2019-10-29 20:24:42,086 Presenting FBO on screen
    2019-10-29 20:24:42,088 1.do_gl_show(gtk3.GLDrawingArea(1, (483, 279), None)) swapping buffers now
    2019-10-29 20:24:42,088 swap_buffers: calling SwapBuffers(0x7f011241)
    2019-10-29 20:24:42,109 gl_show after  96ms took 20ms,  1 updates
    2019-10-29 20:24:42,109 gtk3.GLDrawingArea(1, (483, 279), None).gl_frame_terminator()
    2019-10-29 20:24:42,110 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x0000000006f4a8e0>(GL_FRAMEBUFFER (GL_FRAMEBUFFER), 2)
    2019-10-29 20:24:42,110 gtk3.GLDrawingArea(1, (483, 279), None).do_present_fbo() done
    2019-10-29 20:24:42,110 EndPaint
    2019-10-29 20:24:42,111 map-window wid=1, geometry=(265, 60, 483, 279), client props={'workspace': 65535}, state={'frame': (11, 11, 44, 11)}
    2019-10-29 20:24:42,111 GL do_configure_event(<Gdk.EventConfigure object at 0x0000000029d4bc20 (void at 0x0000000013b46650)>)
    2019-10-29 20:24:42,111 ['configure-window', 1, 265, 60, 483, 279, {}, 0, {}, False]
    2019-10-29 20:24:42,111 configure event: current size=(483, 279), new size=(483, 279), backing=gtk3.GLDrawingArea(1, (483, 279), None), iconified=False
    2019-10-29 20:24:42,112 configure event: size unchanged, queueing redraw
    2019-10-29 20:24:42,112 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,112 BeginPaint hdc=0xffffffffe30110e2
    2019-10-29 20:24:42,112 present_fbo: adding (0, 0, 483, 279) to pending paint list (size=0), flush=0, paint_screen=True
    2019-10-29 20:24:42,112 do_present_fbo: painting ((0, 0, 483, 279),)
    2019-10-29 20:24:42,112 Presenting FBO on screen
    2019-10-29 20:24:42,113 1.do_gl_show(gtk3.GLDrawingArea(1, (483, 279), None)) swapping buffers now
    2019-10-29 20:24:42,113 swap_buffers: calling SwapBuffers(0xffffffffe30110e2)
    2019-10-29 20:24:42,126 gl_show after  16ms took 12ms,  1 updates
    2019-10-29 20:24:42,126 gtk3.GLDrawingArea(1, (483, 279), None).gl_frame_terminator()
    2019-10-29 20:24:42,126 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x0000000006f4a8e0>(GL_FRAMEBUFFER (GL_FRAMEBUFFER), 2)
    2019-10-29 20:24:42,126 gtk3.GLDrawingArea(1, (483, 279), None).do_present_fbo() done
    2019-10-29 20:24:42,127 EndPaint
    2019-10-29 20:24:42,131 clip_to_backing(gtk3.GLDrawingArea(1, (483, 279), None), <cairo.Context object at 0x0000000026f7a710>) rectangle=(0, 0, 483, 279)
    2019-10-29 20:24:42,131 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,132 BeginPaint hdc=0x7f011241
    2019-10-29 20:24:42,132 present_fbo: adding (0, 0, 483, 279) to pending paint list (size=0), flush=0, paint_screen=True
    2019-10-29 20:24:42,132 do_present_fbo: painting ((0, 0, 483, 279),)
    2019-10-29 20:24:42,132 Presenting FBO on screen
    2019-10-29 20:24:42,133 1.do_gl_show(gtk3.GLDrawingArea(1, (483, 279), None)) swapping buffers now
    2019-10-29 20:24:42,133 swap_buffers: calling SwapBuffers(0x7f011241)
    2019-10-29 20:24:42,142 gl_show after  16ms took  9ms,  1 updates
    2019-10-29 20:24:42,143 gtk3.GLDrawingArea(1, (483, 279), None).gl_frame_terminator()
    2019-10-29 20:24:42,143 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x0000000006f4a8e0>(GL_FRAMEBUFFER (GL_FRAMEBUFFER), 2)
    2019-10-29 20:24:42,143 gtk3.GLDrawingArea(1, (483, 279), None).do_present_fbo() done
    2019-10-29 20:24:42,143 EndPaint
    2019-10-29 20:24:42,144 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,145 BeginPaint hdc=0x7f011241
    2019-10-29 20:24:42,145 do_present_fbo: painting ((0, 0, 483, 279),)
    2019-10-29 20:24:42,145 Presenting FBO on screen
    2019-10-29 20:24:42,146 1.do_gl_show(gtk3.GLDrawingArea(1, (483, 279), None)) swapping buffers now
    2019-10-29 20:24:42,146 swap_buffers: calling SwapBuffers(0x7f011241)
    2019-10-29 20:24:42,159 gl_show after  16ms took 13ms,  1 updates
    2019-10-29 20:24:42,159 gtk3.GLDrawingArea(1, (483, 279), None).gl_frame_terminator()
    2019-10-29 20:24:42,159 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x0000000006f4a8e0>(GL_FRAMEBUFFER (GL_FRAMEBUFFER), 2)
    2019-10-29 20:24:42,160 gtk3.GLDrawingArea(1, (483, 279), None).do_present_fbo() done
    2019-10-29 20:24:42,160 EndPaint
    2019-10-29 20:24:42,166 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,167 BeginPaint hdc=0x7f011241
    2019-10-29 20:24:42,167 set_alignment(16, 64, 'RGBA') GL_UNPACK_ROW_LENGTH=0, GL_UNPACK_ALIGNMENT=8
    2019-10-29 20:24:42,167 GL cursor 16x16 uploaded 1024 bytes of RGBA pixel data using copy:bytes
    2019-10-29 20:24:42,167 EndPaint
    2019-10-29 20:24:42,169 gtk3.GLDrawingArea(1, (483, 279), None).do_paint_rgb(RGB, 532948 bytes, x=0, y=0, width=481, height=277, rowstride=1924, options={b'rgb_format': 'RGB', b'quality': 100, b'window-size': (481, 277), 'encoding': 'webp'})
    2019-10-29 20:24:42,169 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,170 BeginPaint hdc=0x7f011241
    2019-10-29 20:24:42,170 RGB update at (0,0) size 481x277 (532948 bytes), using GL copy:memoryview.tobytes format=RGB / UNSIGNED_BYTE to internal format=RGB8
    2019-10-29 20:24:42,170 set_alignment(481, 1924, 'RGB') GL_UNPACK_ROW_LENGTH=641, GL_UNPACK_ALIGNMENT=4
    2019-10-29 20:24:42,171 present_fbo: adding (0, 0, 481, 277) to pending paint list (size=0), flush=0, paint_screen=True
    2019-10-29 20:24:42,172 do_present_fbo: painting ((0, 0, 483, 279),)
    2019-10-29 20:24:42,172 Presenting FBO on screen
    2019-10-29 20:24:42,172 1.do_gl_show(gtk3.GLDrawingArea(1, (483, 279), None)) swapping buffers now
    2019-10-29 20:24:42,172 swap_buffers: calling SwapBuffers(0x7f011241)
    2019-10-29 20:24:42,176 gl_show after  16ms took  3ms,  1 updates
    2019-10-29 20:24:42,176 gtk3.GLDrawingArea(1, (483, 279), None).gl_frame_terminator()
    2019-10-29 20:24:42,176 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x0000000006f4a8e0>(GL_FRAMEBUFFER (GL_FRAMEBUFFER), 2)
    2019-10-29 20:24:42,176 gtk3.GLDrawingArea(1, (483, 279), None).do_present_fbo() done
    2019-10-29 20:24:42,176 EndPaint
    2019-10-29 20:24:42,273 gtk3.GLDrawingArea(1, (483, 279), None).do_paint_rgb(RGB, 532948 bytes, x=0, y=0, width=481, height=277, rowstride=1924, options={b'rgb_format': 'RGB', b'quality': 100, b'window-size': (481, 277), 'encoding': 'webp'})
    2019-10-29 20:24:42,273 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,273 BeginPaint hdc=0xffffffffe30110e2
    2019-10-29 20:24:42,273 RGB update at (0,0) size 481x277 (532948 bytes), using GL copy:memoryview.tobytes format=RGB / UNSIGNED_BYTE to internal format=RGB8
    2019-10-29 20:24:42,274 set_alignment(481, 1924, 'RGB') GL_UNPACK_ROW_LENGTH=641, GL_UNPACK_ALIGNMENT=4
    2019-10-29 20:24:42,276 present_fbo: adding (0, 0, 481, 277) to pending paint list (size=0), flush=0, paint_screen=True
    2019-10-29 20:24:42,276 do_present_fbo: painting ((0, 0, 483, 279),)
    2019-10-29 20:24:42,276 Presenting FBO on screen
    2019-10-29 20:24:42,276 1.do_gl_show(gtk3.GLDrawingArea(1, (483, 279), None)) swapping buffers now
    2019-10-29 20:24:42,277 swap_buffers: calling SwapBuffers(0xffffffffe30110e2)
    2019-10-29 20:24:42,292 gl_show after 116ms took 16ms,  1 updates
    2019-10-29 20:24:42,293 gtk3.GLDrawingArea(1, (483, 279), None).gl_frame_terminator()
    2019-10-29 20:24:42,293 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x0000000006f4a8e0>(GL_FRAMEBUFFER (GL_FRAMEBUFFER), 2)
    2019-10-29 20:24:42,293 gtk3.GLDrawingArea(1, (483, 279), None).do_present_fbo() done
    2019-10-29 20:24:42,293 EndPaint
    2019-10-29 20:24:42,391 gtk3.GLDrawingArea(1, (483, 279), None).do_paint_rgb(RGB, 532948 bytes, x=0, y=0, width=481, height=277, rowstride=1924, options={b'rgb_format': 'RGB', b'quality': 100, b'window-size': (481, 277), 'encoding': 'webp'})
    2019-10-29 20:24:42,391 wglMakeCurrent(0xffffffffe701115e, 0x20000)
    2019-10-29 20:24:42,393 BeginPaint hdc=0x700110bd
    2019-10-29 20:24:42,393 RGB update at (0,0) size 481x277 (532948 bytes), using GL copy:memoryview.tobytes format=RGB / UNSIGNED_BYTE to internal format=RGB8
    2019-10-29 20:24:42,393 set_alignment(481, 1924, 'RGB') GL_UNPACK_ROW_LENGTH=641, GL_UNPACK_ALIGNMENT=4
    2019-10-29 20:24:42,397 present_fbo: adding (0, 0, 481, 277) to pending paint list (size=0), flush=0, paint_screen=True
    2019-10-29 20:24:42,398 do_present_fbo: painting ((0, 0, 483, 279),)
    2019-10-29 20:24:42,398 Presenting FBO on screen
    2019-10-29 20:24:42,400 1.do_gl_show(gtk3.GLDrawingArea(1, (483, 279), None)) swapping buffers now
    2019-10-29 20:24:42,400 swap_buffers: calling SwapBuffers(0x700110bd)
    2019-10-29 20:24:42,409 gl_show after 116ms took  9ms,  1 updates
    2019-10-29 20:24:42,410 gtk3.GLDrawingArea(1, (483, 279), None).gl_frame_terminator()
    2019-10-29 20:24:42,411 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x0000000006f4a8e0>(GL_FRAMEBUFFER (GL_FRAMEBUFFER), 2)
    2019-10-29 20:24:42,412 gtk3.GLDrawingArea(1, (483, 279), None).do_present_fbo() done
    2019-10-29 20:24:42,412 EndPaint
    

Changed 3 weeks ago by Antoine Martin

Attachment: gtkglarea.patch added

try to use Gtk.GLArea

comment:3 Changed 3 weeks ago by Antoine Martin

Priority: criticalblocker

Turns out that we may be able to use GTK.GLArea with legacy contexts: GTK Bug 756142 - Bring back support for legacy OpenGL contexts using the undocumented env var GDK_GL=legacy. (patch hooks the widget)

As per gdkglcontext-win32.c: OpenGL does not work with WS_EX_LAYERED enabled, so we need to disable WS_EX_LAYERED when we acquire a valid HGLRC
I've tried doing the same thing in the window style fixup code (removing WS_EX_LAYERED), but that did not help.

comment:4 Changed 3 weeks ago by Antoine Martin

This may help if we have to use gtk.glarea: #2467 move to opengl core profile

comment:5 Changed 2 weeks ago by Antoine Martin

As per #2469, this also seems to affect some linux drivers.

comment:6 Changed 2 weeks ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Easy fix in r24350 + r24351 + r24353, with older versions use:

XPRA_OPENGL_DRAW_REFRESH=1 ./Xpra_cmd.exe attach ...

Backport in r24352.

comment:7 Changed 2 weeks ago by Antoine Martin

Resolution: fixed
Status: closedreopened

The fix is incorrect, it ends up disabling opengl because this now triggers a rendering error:

Error presenting FBO
Traceback (most recent call last):
  File "E:\Xpra\trunk\src/xpra/client/gl/gl_window_backing_base.py", line 666, in present_fbo
    self.do_present_fbo()
  File "E:\Xpra\trunk\src/xpra/client/gl/gl_window_backing_base.py", line 691, in do_present_fbo
    glBindFramebuffer(GL_FRAMEBUFFER, 0)
  File "E:\Xpra\trunk\src\dist\lib\library.zip\OpenGL\error.py", line 223, in glCheckError
    raise GLError(
OpenGL.error.GLError: GLError(
        err = 1282,
        description = b'invalid operation',
        baseOperation = glBindFramebuffer,
        cArguments = (GL_FRAMEBUFFER, 0)
)
EndPaint

comment:8 Changed 2 weeks ago by Antoine Martin

The rendering error is fixed in r24365, but the window remains transparent..

comment:9 Changed 2 weeks ago by Antoine Martin

"Fix" for now is to disable opengl on win32: r24369 + r24371.

Backport in r24374.

See also #2243 and r23305, maybe #2457 is related somehow?

Last edited 2 weeks ago by Antoine Martin (previous) (diff)

comment:10 Changed 10 days ago by Antoine Martin

Resolution: fixed
Status: reopenedclosed

Indeed, #2457 and #2475 were related and r24405 fixes all 3 bugs.

So r24405 partially reverts r24369 and r24371: we just keep the opengl variable substitution in the config file.
v3.x revert in r24406.

comment:11 Changed 20 hours ago by Antoine Martin

XPRA_OPENGL_DRAW_REFRESH=1 seems to have caused a performance regression: #2481

Note: See TracTickets for help on using tickets.