зеркало из https://github.com/mozilla/gecko-dev.git
Use double precision when computing the backdrop copy rect. (bug 1243071 part 2, r=mattwoodrow)
This commit is contained in:
Родитель
d11fbc361b
Коммит
3183956eeb
|
@ -184,8 +184,8 @@ struct RectTyped :
|
|||
{
|
||||
*aOut = IntRectTyped<units>(int32_t(this->X()), int32_t(this->Y()),
|
||||
int32_t(this->Width()), int32_t(this->Height()));
|
||||
return RectTyped<units>(F(aOut->x), F(aOut->y),
|
||||
F(aOut->width), F(aOut->height))
|
||||
return RectTyped<units, F>(F(aOut->x), F(aOut->y),
|
||||
F(aOut->width), F(aOut->height))
|
||||
.IsEqualEdges(*this);
|
||||
}
|
||||
|
||||
|
|
|
@ -369,11 +369,13 @@ Compositor::ComputeBackdropCopyRect(const gfx::Rect& aRect,
|
|||
renderBounds.MoveBy(rtOffset);
|
||||
|
||||
// Apply the layer transform.
|
||||
gfx::Rect dest = aTransform.TransformAndClipBounds(aRect, renderBounds);
|
||||
gfx::RectDouble dest = aTransform.TransformAndClipBounds(
|
||||
gfx::RectDouble(aRect.x, aRect.y, aRect.width, aRect.height),
|
||||
gfx::RectDouble(renderBounds.x, renderBounds.y, renderBounds.width, renderBounds.height));
|
||||
dest -= rtOffset;
|
||||
|
||||
// Ensure we don't round out to -1, which trips up Direct3D.
|
||||
dest.IntersectRect(dest, gfx::Rect(0, 0, rtSize.width, rtSize.height));
|
||||
dest.IntersectRect(dest, gfx::RectDouble(0, 0, rtSize.width, rtSize.height));
|
||||
|
||||
// Round out to integer.
|
||||
gfx::IntRect result;
|
||||
|
|
Загрузка…
Ссылка в новой задаче