This patch fixes three problems:
- After D11630, fading to a raster image with alpha channel and 'None' background resulted in the old image showing through the transparent parts of the new image, then disappearing.
- Switching to an SVG from a raster image resulted in the raster image not fading, then disappearing suddenly at the end of the animation. This was an issue before D11630.
- When OpenGL is used for animations, the full screen background texture appears during animations then disappears.
Problem 1 was due to DocumentView::setEraseBorders, which effectively
filled the background of the document view, leaving the parts within
the image transparent. This was okay before D11630 because the
background behind the image was never visible, it was always filled with
the image itself, or a solid color / checkerboard pattern.
This patch fixes the problem by always filling the background with the
default brush, not just the borders.
Problem 2 is fixed at the same time because the code that erased the
borders had no effect on SVGs because the calculated image rect was the
same size as the document view.
Problem 3 is fixed by using QGraphicsOpacityEffect instead of directoy
setting the opacity using setOpacity.
Depends on D11630
Problem 1 Before
Problem 2 Before
(White background to show it doesn't shine through)