Bug 1222123 - Warning fix in CompositorD3D11.cpp. r=Bas

This commit is contained in:
Nicolas Silva 2015-12-04 11:23:53 +01:00
parent c76a8adec5
commit 65f0364cdd

View File

@ -546,9 +546,7 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect,
const IntSize& srcSize = sourceD3D11->GetSize();
MOZ_ASSERT(srcSize.width >= 0 && srcSize.height >= 0,
"render targets should have nonnegative sizes");
if (srcBox.left >= 0 &&
srcBox.top >= 0 &&
srcBox.left < srcBox.right &&
if (srcBox.left < srcBox.right &&
srcBox.top < srcBox.bottom &&
srcBox.right <= static_cast<uint32_t>(srcSize.width) &&
srcBox.bottom <= static_cast<uint32_t>(srcSize.height)) {