• Benjamin Otte's avatar
    gdkgl: Add gdk_gl_context_get_damage() · 8915be00
    Benjamin Otte authored
    This is a way to query the damaged area of the backbuffer.
    
    The GL renderer uses this to compute the extents of that damage region
    (computed via buffer age) and use them to minimize the area to redraw.
    
    This changes the semantics of GL rendering to "When calling
    gdk_window_begin_frame() with a GL context, the area by
    gdk_gl_context_get_damage() needs to be redrawn and every other pixel of
    the backbuffer is guaranteed to be correct.
    After gdk_window_end_frame() on a GL-drawn window, the whole backbuffer
    must be correct.
    
    We can always glXBufferSwap() now because of this.
    8915be00
gdkglcontext.c 28.6 KB