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

This commit is contained in:
Nicolas Silva 2015-12-04 11:23:53 +01:00
Родитель e9b85ee52f
Коммит 189b50c6c8
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -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)) {