Bug 1340067 - Change DPBegin() to async r=kats

This commit is contained in:
sotaro 2017-02-21 10:30:15 +09:00
parent d5cec4a364
commit 5ab60afb87
4 changed files with 5 additions and 14 deletions

View File

@ -37,8 +37,7 @@ parent:
sync UpdateImage(ImageKey aImageKey, IntSize aSize,
SurfaceFormat aFormat, ByteBuffer aBytes);
sync DeleteImage(ImageKey aImageKey);
sync DPBegin(IntSize aSize)
returns (bool aOutSuccess);
async DPBegin(IntSize aSize);
async DPEnd(WebRenderCommand[] commands, OpDestroy[] toDestroy, uint64_t fwdTransactionId, uint64_t transactionId);
sync DPSyncEnd(WebRenderCommand[] commands, OpDestroy[] toDestroy, uint64_t fwdTransactionId, uint64_t transactionId);
sync DPGetSnapshot(PTexture texture);

View File

@ -60,13 +60,9 @@ WebRenderBridgeChild::DPBegin(const gfx::IntSize& aSize)
{
MOZ_ASSERT(!mDestroyed);
MOZ_ASSERT(!mIsInTransaction);
bool success = false;
UpdateFwdTransactionId();
this->SendDPBegin(aSize, &success);
if (!success) {
return false;
}
UpdateFwdTransactionId();
this->SendDPBegin(aSize);
mIsInTransaction = true;
return true;
}

View File

@ -184,16 +184,13 @@ WebRenderBridgeParent::RecvDeleteImage(const wr::ImageKey& aImageKey)
}
mozilla::ipc::IPCResult
WebRenderBridgeParent::RecvDPBegin(const gfx::IntSize& aSize,
bool* aOutSuccess)
WebRenderBridgeParent::RecvDPBegin(const gfx::IntSize& aSize)
{
if (mDestroyed) {
return IPC_OK();
}
MOZ_ASSERT(mBuilder.isSome());
mBuilder.ref().Begin(LayerIntSize(aSize.width, aSize.height));
*aOutSuccess = true;
return IPC_OK();
}

View File

@ -70,8 +70,7 @@ public:
const gfx::SurfaceFormat& aFormat,
const ByteBuffer& aBuffer) override;
mozilla::ipc::IPCResult RecvDeleteImage(const wr::ImageKey& a1) override;
mozilla::ipc::IPCResult RecvDPBegin(const gfx::IntSize& aSize,
bool* aOutSuccess) override;
mozilla::ipc::IPCResult RecvDPBegin(const gfx::IntSize& aSize) override;
mozilla::ipc::IPCResult RecvDPEnd(InfallibleTArray<WebRenderCommand>&& aCommands,
InfallibleTArray<OpDestroy>&& aToDestroy,
const uint64_t& aFwdTransactionId,