Skip to content
  • Emmanuele Bassi's avatar
    gsk: Make GskRenderer.render() drawing context-agnostic · 3ccd45b9
    Emmanuele Bassi authored
    We're going to need to allow rendering on a specific cairo_t in order to
    implement fallback code paths inside GTK; this means that there will be
    times when we have a transient GskRenderer instance that does not have a
    GdkDrawingContext to draw on.
    
    Instead of adding a new render() implementation for those cases and then
    decide which one to use, we can remove the drawing context argument from
    the virtual function itself, and allow using a NULL GdkDrawingContext
    when calling gsk_renderer_render(). A later commit will add a generic
    function to create a transient GskRenderer with a cairo_t attached to
    it.
    
    Renderers inside GSK will have to check whether we have access to a
    GdkDrawingContext, in which case we're going to use it; or if we have
    access to a cairo_t and a window.
    3ccd45b9