зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1613143. Don't allow an empty transaction to succeed with webrender if we haven't sent a display list to the parent. r=mattwoodrow
I think this probably only shows up with fission oop iframes, tabs probably avoid this path. The problem occurs when we reconstruct the containing iframe for a style change, we briefly hide the child document, clearing the display list on the parent via ClearCachedResources. Then show it again, we attempt an empty transaction and this succeeds because there is nothing to stop it. (The non-wr case fails because the layer contents are missing and that causes the empty transaction to fail.) So keep track if we have sent a display list to the parent to allow/disallow an empty transaction. This fixes a couple webrender+fission reftest failures but it's also a general rendering bug in webrender+fission reproducible in a regular browser. Differential Revision: https://phabricator.services.mozilla.com/D61577 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
45fd8edbdb
Коммит
f4658e4672
|
@ -32,6 +32,7 @@ WebRenderBridgeChild::WebRenderBridgeChild(const wr::PipelineId& aPipelineId)
|
|||
mManager(nullptr),
|
||||
mIPCOpen(false),
|
||||
mDestroyed(false),
|
||||
mSentDisplayList(false),
|
||||
mFontKeysDeleted(),
|
||||
mFontInstanceKeysDeleted() {}
|
||||
|
||||
|
@ -130,6 +131,7 @@ void WebRenderBridgeChild::EndTransaction(
|
|||
mManager->TakeCompositionPayloads(payloads);
|
||||
}
|
||||
|
||||
mSentDisplayList = true;
|
||||
this->SendSetDisplayList(
|
||||
std::move(aRenderRoots), mDestroyedActors, GetFwdTransactionId(),
|
||||
aTransactionId, aContainsSVGGroup, aVsyncId, aVsyncStartTime,
|
||||
|
@ -548,6 +550,7 @@ mozilla::ipc::IPCResult WebRenderBridgeChild::RecvWrReleasedImages(
|
|||
}
|
||||
|
||||
void WebRenderBridgeChild::BeginClearCachedResources() {
|
||||
mSentDisplayList = false;
|
||||
mIsInClearCachedResources = true;
|
||||
// Clear display list and animtaions at parent side before clearing cached
|
||||
// resources on client side. It prevents to clear resources before clearing
|
||||
|
|
|
@ -122,6 +122,7 @@ class WebRenderBridgeChild final : public PWebRenderBridgeChild,
|
|||
*/
|
||||
void Destroy(bool aIsSync);
|
||||
bool IPCOpen() const { return mIPCOpen && !mDestroyed; }
|
||||
bool GetSentDisplayList() const { return mSentDisplayList; }
|
||||
bool IsDestroyed() const { return mDestroyed; }
|
||||
|
||||
uint32_t GetNextResourceId() { return ++mResourceId; }
|
||||
|
@ -250,6 +251,9 @@ class WebRenderBridgeChild final : public PWebRenderBridgeChild,
|
|||
|
||||
bool mIPCOpen;
|
||||
bool mDestroyed;
|
||||
// True iff we have called SendSetDisplayList and haven't called
|
||||
// SendClearCachedResources since that call.
|
||||
bool mSentDisplayList;
|
||||
|
||||
wr::RenderRootArray<uint32_t> mFontKeysDeleted;
|
||||
wr::RenderRootArray<nsDataHashtable<UnscaledFontHashKey, wr::FontKey>>
|
||||
|
|
|
@ -190,6 +190,14 @@ bool WebRenderLayerManager::BeginTransaction(const nsCString& aURL) {
|
|||
}
|
||||
|
||||
bool WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags) {
|
||||
// If we haven't sent a display list (since creation or since the last time we
|
||||
// sent ClearDisplayList to the parent) then we can't do an empty transaction
|
||||
// because the parent doesn't have a display list for us and we need to send a
|
||||
// display list first.
|
||||
if (!WrBridge()->GetSentDisplayList()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Since we don't do repeat transactions right now, just set the time
|
||||
mAnimationReadyTime = TimeStamp::Now();
|
||||
|
||||
|
|
|
@ -1736,7 +1736,7 @@ fuzzy-if(Android,0-4,0-400) == 815593-1.html 815593-1-ref.html
|
|||
== 816876-2b.xhtml 816876-2-ref.xhtml
|
||||
fuzzy-if(skiaContent,0-1,0-5) == 816948-1.html 816948-1-ref.html
|
||||
== 817019-1.html about:blank
|
||||
fuzzy-if(skiaContent,0-1,0-5) fails-if(webrender&&browserIsFission) == 818276-1.html 818276-1-ref.html
|
||||
fuzzy-if(skiaContent,0-1,0-5) random-if(webrender&&browserIsFission) == 818276-1.html 818276-1-ref.html
|
||||
fuzzy-if(asyncPan,0-190,0-510) fuzzy-if(asyncPan&&!layersGPUAccelerated,0-102,0-510) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 825999.html 825999-ref.html # Bug 1392106
|
||||
== 827577-1a.html 827577-1-ref.html
|
||||
== 827577-1b.html 827577-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче