Skip to content
  • Emmanuele Bassi's avatar
    gsk: Tie render nodes to renderers · 3d90a070
    Emmanuele Bassi authored
    Render nodes need access to rendering information like scaling factors.
    If we keep render nodes separate from renderers until we submit a nodes
    tree for rendering we're going to have to duplicate all that information
    in a way that makes the API more complicated and fuzzier on its
    semantics.
    
    By having GskRenderer create GskRenderNode instances we can tie nodes
    and renderers together; since higher layers will also have access to
    the renderer instance, this does not add any burden to callers.
    
    Additionally, if memory measurements indicate that we are spending too
    much time in the allocation of new render nodes, we can now easily
    implement a free-list or a renderer-specific allocator without breaking
    the API.
    3d90a070