Skip to content
  • Robert Bragg's avatar
    Provide stable paint-boxes for fixed sized actors · 3183240f
    Robert Bragg authored
    
    
    This updates _clutter_paint_volume_get_stage_paint_box to try and
    calculate more stable paint-box sizes for fixed sized paint-volumes by
    not basing the size on the volume's sub-pixel position.
    
    So the aim is that for a given rectangle defined with floating point
    coordinates we want to determine a stable quantized size in pixels that
    doesn't vary due to the original box's sub-pixel position.
    
    The reason this is important is because effects will use this API to
    determine the size of offscreen framebuffers and so for a fixed-size
    object that may be animated across the screen we want to make sure that
    the stage paint-box has an equally stable size so that effects aren't
    made to continuously re-allocate a corresponding fbo.
    
    The other thing we consider is that the calculation of this box is
    subject to floating point precision issues that might be slightly
    different to the precision issues involved with actually painting the
    actor, which might result in painting slightly leaking outside the
    user's calculated paint-volume. This patch now adds padding to consider
    this too.
    
    Signed-off-by: default avatarNeil Roberts <neil@linux.intel.com>
    Signed-off-by: default avatarEmmanuele Bassi <ebassi@linux.intel.com>
    3183240f