Bug 1762973 - Skip empty composite requests. r=gfx-reviewers,bradwerth

Differential Revision: https://phabricator.services.mozilla.com/D143067
This commit is contained in:
Lee Salzman 2022-04-06 16:08:46 +00:00
Родитель 14f4e64763
Коммит 82ae2ce04b
3 изменённых файлов: 38 добавлений и 0 удалений

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

@ -0,0 +1,29 @@
<style>
* { clip-path: polygon(0px 0px, 1px 61px, 1px 0px); }
</style>
<script>
window.requestIdleCallback(() => {
document.documentElement.style.display='none'
document.documentElement.getBoundingClientRect()
document.documentElement.style.display=''
setTimeout(() => { window.location.reload(true) }, 500) // helps reproduction
})
function go() {
var x = document.defaultView.getSelection()
window.stop()
x.collapse(d)
document.execCommand("removeFormat", false)
x.collapse(a)
}
function eh() {
d.setAttributeNode(document.createAttribute("contenteditable"))
c.src = "data:audio/mpeg;base64,/+M4wAAAAAAAAAAAAEluZm8AAAAPAAAAAwAAAbAAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV////////////////////////////////////////////AAAAAExhdmM1Ny4zOAAAAAAAAAAAAAAAACQAAAAAAAAAAAGwU/hwzwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/+MYxAAMkI7huAhMDGQAndv+H5jfIAPmPzGBGeTAZNN7yjsnqd6Fny79M+o4UifnMu/TlDiIP5Q5l9Z/Kdv6VY0gE3JIAAwE/+MYxAgMYJr6WBhGIivjMy/CEK+zM39VVXjMArKgq6DQdrBV0THlqBp0ShrBp8qGsTPw7lXZFVZZY6GytZZYGChgYIGZaiJI/+MYxBEMUJnAABmMYUigMQLIE1yVpphA1UQMRVVVV000iVu000VVVX///6aaVUxBTUUzLjk5LjVVVVVVVVVVVVVVVVVVVVVV"
b.appendChild(a)
}
</script>
<body onload=go()>
<dialog id="a" open="true"></dialog>
<details id="b" style="writing-mode: vertical-rl" open="true" ontoggle="eh()">
<summary style="position: fixed"></summary>
<embed id="c"></embed>
<ol id="d"></ol>

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

@ -211,3 +211,4 @@ load 1730695.html
load 1745775.html load 1745775.html
load 1757002.html load 1757002.html
load 1758127-1.html load 1758127-1.html
load 1762973-1.html

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

@ -435,6 +435,10 @@ void Composite(LockedTexture* lockedDst, LockedTexture* lockedSrc, GLint srcX,
IntRect{srcX, srcY, srcX + srcWidth, srcY + srcHeight} - srctex.offset; IntRect{srcX, srcY, srcX + srcWidth, srcY + srcHeight} - srctex.offset;
IntRect dstReq = IntRect dstReq =
IntRect{dstX, dstY, dstX + dstWidth, dstY + dstHeight} - dsttex.offset; IntRect{dstX, dstY, dstX + dstWidth, dstY + dstHeight} - dsttex.offset;
if (srcReq.is_empty() || dstReq.is_empty()) {
return;
}
// Compute clip rect as relative to the dstReq, as that's the same coords // Compute clip rect as relative to the dstReq, as that's the same coords
// as used for the sampling bounds. // as used for the sampling bounds.
IntRect clipRect = {clipX - dstX, clipY - dstY, clipX - dstX + clipWidth, IntRect clipRect = {clipX - dstX, clipY - dstY, clipX - dstX + clipWidth,
@ -1230,6 +1234,10 @@ void CompositeYUV(LockedTexture* lockedDst, LockedTexture* lockedY,
IntRect{srcX, srcY, srcX + srcWidth, srcY + srcHeight} - ytex.offset; IntRect{srcX, srcY, srcX + srcWidth, srcY + srcHeight} - ytex.offset;
IntRect dstReq = IntRect dstReq =
IntRect{dstX, dstY, dstX + dstWidth, dstY + dstHeight} - dsttex.offset; IntRect{dstX, dstY, dstX + dstWidth, dstY + dstHeight} - dsttex.offset;
if (srcReq.is_empty() || dstReq.is_empty()) {
return;
}
// Compute clip rect as relative to the dstReq, as that's the same coords // Compute clip rect as relative to the dstReq, as that's the same coords
// as used for the sampling bounds. // as used for the sampling bounds.
IntRect clipRect = {clipX - dstX, clipY - dstY, clipX - dstX + clipWidth, IntRect clipRect = {clipX - dstX, clipY - dstY, clipX - dstX + clipWidth,