0e151bb487
Previously, if a surface was transformed, it repainted as a whole, regardless of the computed repaint region. As damage regions determine repaint regions and whether a surface is considered for drawing at all, this lead to disappearing surfaces if all surfaces were considered transformed. Also transparent transformed surfaces were redrawn without the surfaces below being properly redrawn, leading to alpha-saturation. Fix that by making texture_region() use the proper global-to-surface coordinate transformation for texture coordinates. This makes it possible to call texture_region() also for transformed surfaces. As texture coordinates may now lie outside the valid texture image, the fragment shader is modified to check the fragment texture coordinates. The special path texture_transformed_surface() is no longer used and is removed. This change fixes many of the rendering artifacts related to transformed surfaces. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>