зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1442748 - Don't generate frames if we haven't received a display list. r=kats
This commit is contained in:
Родитель
0e437cae41
Коммит
81db82c188
|
@ -177,6 +177,7 @@ WebRenderBridgeParent::WebRenderBridgeParent(CompositorBridgeParentBase* aCompos
|
|||
, mPaused(false)
|
||||
, mDestroyed(false)
|
||||
, mForceRendering(false)
|
||||
, mReceivedDisplayList(false)
|
||||
{
|
||||
MOZ_ASSERT(mAsyncImageManager);
|
||||
MOZ_ASSERT(mAnimStorage);
|
||||
|
@ -197,6 +198,7 @@ WebRenderBridgeParent::WebRenderBridgeParent(const wr::PipelineId& aPipelineId)
|
|||
, mPaused(false)
|
||||
, mDestroyed(true)
|
||||
, mForceRendering(false)
|
||||
, mReceivedDisplayList(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -597,6 +599,8 @@ WebRenderBridgeParent::RecvSetDisplayList(const gfx::IntSize& aSize,
|
|||
return IPC_FAIL(this, "Failed to deserialize resource updates");
|
||||
}
|
||||
|
||||
mReceivedDisplayList = true;
|
||||
|
||||
wr::Vec<uint8_t> dlData(Move(dl));
|
||||
|
||||
// If id namespaces do not match, it means the command is obsolete, probably
|
||||
|
@ -1180,7 +1184,7 @@ WebRenderBridgeParent::CompositeToTarget(gfx::DrawTarget* aTarget, const gfx::In
|
|||
MOZ_ASSERT(aRect == nullptr);
|
||||
|
||||
AUTO_PROFILER_TRACING("Paint", "CompositeToTraget");
|
||||
if (mPaused) {
|
||||
if (mPaused || !mReceivedDisplayList) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1372,6 +1376,7 @@ WebRenderBridgeParent::ClearResources()
|
|||
|
||||
wr::TransactionBuilder txn;
|
||||
txn.ClearDisplayList(wr::NewEpoch(wrEpoch), mPipelineId);
|
||||
mReceivedDisplayList = false;
|
||||
|
||||
// Schedule generate frame to clean up Pipeline
|
||||
ScheduleGenerateFrame();
|
||||
|
|
|
@ -272,6 +272,7 @@ private:
|
|||
bool mPaused;
|
||||
bool mDestroyed;
|
||||
bool mForceRendering;
|
||||
bool mReceivedDisplayList;
|
||||
|
||||
// Can only be accessed on the compositor thread.
|
||||
WebRenderScrollData mScrollData;
|
||||
|
|
Загрузка…
Ссылка в новой задаче