зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1064864. Ensure the copying bounds are sane. r=jrmuizel
This prevents things from going really bad on some drivers. --HG-- extra : rebase_source : c237cf3e6a6174696ebe6d41562a30c8cc0e564d
This commit is contained in:
Родитель
7b547af509
Коммит
9d622e3111
|
@ -466,7 +466,11 @@ 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.right <= static_cast<uint32_t>(srcSize.width) &&
|
||||
if (srcBox.left >= 0 &&
|
||||
srcBox.top >= 0 &&
|
||||
srcBox.left < srcBox.right &&
|
||||
srcBox.top < srcBox.bottom &&
|
||||
srcBox.right <= static_cast<uint32_t>(srcSize.width) &&
|
||||
srcBox.bottom <= static_cast<uint32_t>(srcSize.height)) {
|
||||
mContext->CopySubresourceRegion(texture, 0,
|
||||
0, 0, 0,
|
||||
|
|
Загрузка…
Ссылка в новой задаче