Bug 1449641 - Use the correct parameter when computing the clear rect. r?sotaro
This was incorrectly using the invalid rect, so it was clearing more than
necessary and not taking advantage of the opaque region that the caller computes.
The idea is that we don't need to clear parts of the invalid region that will be
covered by something opaque.
MozReview-Commit-ID: LhEkVUMnjC9
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -308,17 +308,17 @@ BasicCompositor::CreateRenderTargetForWi
} else {
IntRect windowRect = rect;
// Adjust bounds rect to account for new origin at (0, 0).
if (windowRect.Size() != mDrawTarget->GetSize()) {
windowRect.ExpandToEnclose(IntPoint(0, 0));
}
rt = new BasicCompositingRenderTarget(mDrawTarget, windowRect);
if (!aClearRect.IsEmpty()) {
- IntRect clearRect = aRect.ToUnknownRect();
+ IntRect clearRect = aClearRect.ToUnknownRect();
mDrawTarget->ClearRect(Rect(clearRect - rt->GetOrigin()));
}
}
return rt.forget();
}
already_AddRefed<DataTextureSource>