зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1582645. Only set mLastVisibleRect after we've sent it to WebRender. r=nical
This avoids us setting when we don't send it. e.g. When it's empty. Differential Revision: https://phabricator.services.mozilla.com/D47028 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5bc5a92887
Коммит
bdcf335677
|
@ -295,8 +295,12 @@ struct DIGroup {
|
|||
IntRect mInvalidRect;
|
||||
nsRect mGroupBounds;
|
||||
LayerIntRect mVisibleRect;
|
||||
// This is the last visible rect sent to WebRender. It's used
|
||||
// to compute the invalid rect and ensure that we send
|
||||
// the appropriate data to WebRender for merging.
|
||||
LayerIntRect mLastVisibleRect;
|
||||
// this is the intersection of mVisibleRect and mLastVisibleRect
|
||||
|
||||
// This is the intersection of mVisibleRect and mLastVisibleRect
|
||||
// we ensure that mInvalidRect is contained in mPreservedRect
|
||||
IntRect mPreservedRect;
|
||||
int32_t mAppUnitsPerDevPixel;
|
||||
|
@ -630,6 +634,7 @@ struct DIGroup {
|
|||
mKey.value().second(),
|
||||
ViewAs<ImagePixel>(mVisibleRect,
|
||||
PixelCastJustification::LayerIsImage));
|
||||
mLastVisibleRect = mVisibleRect;
|
||||
PushImage(aBuilder, itemBounds);
|
||||
}
|
||||
return;
|
||||
|
@ -741,6 +746,7 @@ struct DIGroup {
|
|||
aResources.SetBlobImageVisibleArea(
|
||||
mKey.value().second(),
|
||||
ViewAs<ImagePixel>(mVisibleRect, PixelCastJustification::LayerIsImage));
|
||||
mLastVisibleRect = mVisibleRect;
|
||||
PushImage(aBuilder, itemBounds);
|
||||
GP("End EndGroup\n\n");
|
||||
}
|
||||
|
@ -1524,7 +1530,6 @@ void WebRenderCommandBuilder::DoGroupingForDisplayList(
|
|||
group.mResidualOffset = residualOffset;
|
||||
group.mGroupBounds = groupBounds;
|
||||
group.mLayerBounds = layerBounds;
|
||||
group.mLastVisibleRect = group.mVisibleRect;
|
||||
group.mVisibleRect = visibleRect;
|
||||
group.mPreservedRect = group.mVisibleRect.Intersect(group.mLastVisibleRect).ToUnknownRect();
|
||||
group.mAppUnitsPerDevPixel = appUnitsPerDevPixel;
|
||||
|
|
|
@ -230,3 +230,4 @@ load 1539318-1.svg
|
|||
load 1548985-1.html
|
||||
load 1548985-2.svg
|
||||
load 1555851.html
|
||||
load invalidation-of-opacity-0.html
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<html class="reftest-wait">
|
||||
<script>
|
||||
var i = 0;
|
||||
var opac = [0.3, 0.2, 0, 0.3];
|
||||
|
||||
function f() {
|
||||
document.getElementById("rim").setAttribute("opacity", opac[i]);
|
||||
document.getElementById("circ").setAttribute("r", i + 10);
|
||||
i++;
|
||||
if (i > opac.length) {
|
||||
document.documentElement.className = ""
|
||||
} else {
|
||||
requestAnimationFrame(f);
|
||||
}
|
||||
}
|
||||
onload = () => requestAnimationFrame(f);
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<svg height="1000" width="1000">
|
||||
<circle cx="50" cy="50" r="40" fill="red" />
|
||||
<g id=rim clip-path="url(#myClip)" opacity=0>
|
||||
<circle id="circ" cx="150" cy="150" r="40" fill="red" />
|
||||
</g>
|
||||
<circle cx="250" cy="250" r="40" fill="red" />
|
||||
</svg>
|
Загрузка…
Ссылка в новой задаче