Bug 1508526 - Remove unnecessary ScheduleGenerateFrame() call in WebRenderBridgeParent::RecvUpdateResources() r=aosmond

This commit is contained in:
sotaro 2018-11-22 17:24:50 +09:00
Родитель 14322dd0bd
Коммит 8b972d1dc6
6 изменённых файлов: 8 добавлений и 19 удалений

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

@ -54,7 +54,7 @@ parent:
OpUpdateResource[] aResourceUpdates, RefCountedShmem[] aSmallShmems, Shmem[] aLargeShmems,
IdNamespace aIdNamespace, TimeStamp refreshStartTime, TimeStamp txnStartTime, nsCString txnURL, TimeStamp fwdTime);
async SetFocusTarget(FocusTarget focusTarget);
async UpdateResources(OpUpdateResource[] aResourceUpdates, RefCountedShmem[] aSmallShmems, Shmem[] aLargeShmems, bool scheduleComposite);
async UpdateResources(OpUpdateResource[] aResourceUpdates, RefCountedShmem[] aSmallShmems, Shmem[] aLargeShmems);
async ParentCommands(WebRenderParentCommand[] commands);
sync GetSnapshot(PTexture texture);
async SetLayersObserverEpoch(LayersObserverEpoch childEpoch);

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

@ -96,8 +96,7 @@ WebRenderBridgeChild::BeginTransaction()
}
void
WebRenderBridgeChild::UpdateResources(wr::IpcResourceUpdateQueue& aResources,
bool aScheduleComposite /* = false */)
WebRenderBridgeChild::UpdateResources(wr::IpcResourceUpdateQueue& aResources)
{
if (!IPCOpen()) {
aResources.Clear();
@ -114,7 +113,7 @@ WebRenderBridgeChild::UpdateResources(wr::IpcResourceUpdateQueue& aResources,
aResources.Flush(resourceUpdates, smallShmems, largeShmems);
this->SendUpdateResources(resourceUpdates, smallShmems,
largeShmems, aScheduleComposite);
largeShmems);
}
void

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

@ -66,8 +66,7 @@ public:
void AddWebRenderParentCommand(const WebRenderParentCommand& aCmd);
void UpdateResources(wr::IpcResourceUpdateQueue& aResources,
bool aScheduleComposite = false);
void UpdateResources(wr::IpcResourceUpdateQueue& aResources);
void BeginTransaction();
void EndTransaction(const wr::LayoutSize& aContentSize,
wr::BuiltDisplayList& dl,

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

@ -749,8 +749,7 @@ WebRenderBridgeParent::ObserveSharedSurfaceRelease(const nsTArray<wr::ExternalIm
mozilla::ipc::IPCResult
WebRenderBridgeParent::RecvUpdateResources(nsTArray<OpUpdateResource>&& aResourceUpdates,
nsTArray<RefCountedShmem>&& aSmallShmems,
nsTArray<ipc::Shmem>&& aLargeShmems,
const bool& aScheduleComposite)
nsTArray<ipc::Shmem>&& aLargeShmems)
{
if (mDestroyed) {
wr::IpcResourceUpdateQueue::ReleaseShmems(this, aSmallShmems);
@ -770,11 +769,6 @@ WebRenderBridgeParent::RecvUpdateResources(nsTArray<OpUpdateResource>&& aResourc
return IPC_FAIL(this, "Invalid WebRender resource data shmem or address.");
}
if (aScheduleComposite) {
txn.InvalidateRenderedFrame();
ScheduleGenerateFrame();
}
mApi->SendTransaction(txn);
return IPC_OK();

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

@ -80,8 +80,7 @@ public:
mozilla::ipc::IPCResult RecvDeleteCompositorAnimations(InfallibleTArray<uint64_t>&& aIds) override;
mozilla::ipc::IPCResult RecvUpdateResources(nsTArray<OpUpdateResource>&& aUpdates,
nsTArray<RefCountedShmem>&& aSmallShmems,
nsTArray<ipc::Shmem>&& aLargeShmems,
const bool& aScheduleComposite) override;
nsTArray<ipc::Shmem>&& aLargeShmems) override;
mozilla::ipc::IPCResult RecvSetDisplayList(const gfx::IntSize& aSize,
InfallibleTArray<WebRenderParentCommand>&& aCommands,
InfallibleTArray<OpDestroy>&& aToDestroy,

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

@ -364,8 +364,7 @@ WebRenderLayerManager::EndTransactionWithoutLayer(nsDisplayList* aDisplayList,
// If we can't just swap the queue, we need to take the slow path and
// send the update as a separate message. We don't need to schedule a
// composite however because that will happen with EndTransaction.
WrBridge()->UpdateResources(mAsyncResourceUpdates.ref(),
/* aScheduleComposite */ false);
WrBridge()->UpdateResources(mAsyncResourceUpdates.ref());
}
mAsyncResourceUpdates.reset();
}
@ -761,8 +760,7 @@ WebRenderLayerManager::FlushAsyncResourceUpdates()
}
if (!IsDestroyed() && WrBridge()) {
WrBridge()->UpdateResources(mAsyncResourceUpdates.ref(),
/* aScheduleComposite */ true);
WrBridge()->UpdateResources(mAsyncResourceUpdates.ref());
}
mAsyncResourceUpdates.reset();