Handling drawables with self surface dependency
@yhalperi
Submitted by Yonit Halperin Assigned to Spice Bug List
Description
We need to handle rendering when one of the drawable surfaces_dest is the same surface of the drawable it self. If the dependency is a COPY_BITS one, this is already handled correctly by "shadows" in the "current" trees. However, it is possible, though I didn't observe it, that it won't be a COPY_BITS situtation.
In commit 66a7c4a5e5c01623fd77e4ffc51c244a91d4b3cf, I removed the cyclic dependencies since I thought they were already handled implicitly by COPY_BITS and self_bitmaps, but it is not always the case. Need to check again if the previous solution, which allowed recursions of red_update_area is not buggy.
summary: red_handle_surfaces_dependencies should add self dependencies that are not derived from COPY_BITS; and red_update_area and red_update_area_till should be changed to handle correctly self dependencies. Another possible solution may be to render the problematic surface area when we encounter self dependency in red_process_drawable (and as mentioned, these cases seems rare).