• Zhigang Gong's avatar
    glamor: Avoid 2D bitblit if possible. · 1f3f3baf
    Zhigang Gong authored
    
    
    It turns out that the use of fbo blit is one of the root cause
    which lead to slow drawing, especially slow filling rects.
    
    We guess there should be a performance bug in the mesa driver
    or even in the kernel drm driver. Currently, the only thing
    glamor can do is to avoid calling those functions.
    
    We check whether the copy source and destination has overlapped
    region, if it has, we have to call fbo blit function. If it has
    not, we can load the source texture directly and draw it to the
    target texture. We totally don't need the glCopyPixels here, so
    remove it.
    
    By apply this patch, the rendering time of firefox-planet-gnome
    decrease to 10.4 seconds. At the same platform, uxa driver get 13
    seconds. This is the first time we get better performance than
    uxa driver.
    Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
    1f3f3baf