Skip to content
  • Alexander Larsson's avatar
    protocol: Modes are specified in HW pixels · b6930889
    Alexander Larsson authored
    Modes are mainly meant to be used in coordination with fullscreen in
    DRIVER mode, by e.g. games. For such games what they generally want
    is to match some hardware mode and resize their window for that. We
    don't really need to complicate this with the scaling. So, we
    keep the resolutions in HW pixels, and drop the SCALED flag (as it
    is now useless).
    
    This lets you just create e.g an 800x600 buffer of scale 1 and
    fullscreen that, ignoring the output scaling factor (although you can
    of course also respect it and create a 400x300 surface at scale 2).
    Conceptually the mode change is treated like a scaling which overrides
    the normal output scale.
    
    The only complexity is the FILL mode where it can happen that the user
    specifies a buffer of the same size as the screen, but the output has scale
    2 and the buffer scale 1. Just scanning out this buffer will work, but
    effectively this is a downscaling operation, as the "real" size of the surface
    in pels is twice the size of the output. We solve this by allowing FILL to
    downscale (but still not upscale).
    b6930889