Skip to content
  • Pekka Paalanen's avatar
    libweston: add weston_renderer::resize_output() · 86364223
    Pekka Paalanen authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    Previously renderers were not told when the output (framebuffer they
    need to draw) size changed. Renderers just pulled that information out
    from weston_output::current_mode when they happened to need it. This
    makes some things awkward, like resizing the shadow or intermediate
    buffers. In fact, Pixman-renderer does not even support resizing its
    shadow buffer, nor does GL-renderer. DRM-backend has to destroy and
    re-create the renderer output state anyway, but rdp, x11 and wayland
    backends would be natural users of resizing API.
    
    This commit adds an API for resizing with empty implementations. Actual
    implementations will be added in following patches for each renderer
    while moving parts of resizing code from backends into the renderers.
    No-op renderer needs no implementation.
    
    Only wayland-backend has actual resizing code already, and that is made
    to call the new API. Unfortunately, Pixman and GL renderers differ: one
    does not blit them while the other does. In order to assert the
    functionality of each renderer to keep the API consistent,
    wayland-backend needs to lie to pixman-renderer. That's not new, it
    already does so in wayland_output_get_shm_buffer() where the 'pm_image'
    addresses only the interior area instead of the whole buffer.
    
    Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    86364223
Loading