xpra icon
Bug tracker and wiki

Ticket #981: opengl-show-wait-time.patch

File opengl-show-wait-time.patch, 1.6 KB (added by Antoine Martin, 4 years ago)

shows how long it takes to call swap_buffers

  • xpra/client/gl/gl_window_backing_base.py

     
    99
    1010from xpra.log import Logger
    1111log = Logger("opengl", "paint")
     12fpslog = Logger("opengl", "fps")
    1213OPENGL_DEBUG = os.environ.get("XPRA_OPENGL_DEBUG", "0")=="1"
    1314OPENGL_PAINT_BOX = int(os.environ.get("XPRA_OPENGL_PAINT_BOX", "0"))
    1415
     
    568569        log("%s.do_present_fbo() done", self)
    569570
    570571    def gl_show(self):
     572        start = time.time()
    571573        if self.glconfig.is_double_buffered():
    572574            # Show the backbuffer on screen
    573575            log("%s.gl_show() swapping buffers now", self)
     
    577579            #just ensure stuff gets painted:
    578580            log("%s.gl_show() flushing", self)
    579581            glFlush()
     582        end = time.time()
     583        fpslog("gl_show took %ims", (end-start)*1000)
    580584
    581585
    582586    def paint_box(self, encoding, is_delta, x, y, w, h):
  • xpra/log.py

     
    144144                ("file"         , "File transfers"),
    145145                ("keyboard"     , "Keyboard mapping and key event handling"),
    146146                ("screen"       , "Screen and workarea dimension"),
     147                ("fps"          , "Frames per second"),
    147148                ("xsettings"    , "XSettings synchronization"),
    148149                ("dbus"         , "DBUS calls"),
    149150                ("rpc"          , "Remote Procedure Calls"),