Bug 593618 - Because we always paint the whole texture we're drawing to, we need to validate and draw the _bounds_ of the visible region, not just the visible region's subrectangles. r=bas a=blocking2.0:beta6+

This commit is contained in:
Joe Drew 2010-09-05 01:31:19 -04:00
parent 8460fa015a
commit 8678c3e212

View File

@ -200,13 +200,19 @@ ThebesLayerD3D9::RenderLayer()
mValidRegion.SetEmpty();
}
if (!mValidRegion.IsEqual(mVisibleRegion)) {
if (!mValidRegion.IsEqual(mVisibleRegion.GetBounds())) {
/* We use the bounds of the visible region because we draw the bounds of
* this region when we draw this entire texture. We have to make sure that
* the areas that aren't filled with content get their background drawn.
* This is an issue for opaque surfaces, which otherwise won't get their
* background painted.
*/
nsIntRegion region;
region.Sub(mVisibleRegion, mValidRegion);
region.Sub(mVisibleRegion.GetBounds(), mValidRegion);
DrawRegion(region);
mValidRegion = mVisibleRegion;
mValidRegion = mVisibleRegion.GetBounds();
}
float quadTransform[4][4];