зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1369840 - Support getting the compositor-side APZ test data over PWebRenderBridge. r=botond
This is fairly straightforward plumbing. The webrender equivalent of PLayerTransaction is PWebRenderBridge and we can use that to get the compositor-side APZTestData. MozReview-Commit-ID: JE9WkmejuM9 --HG-- extra : rebase_source : 8872e8dffb988740fa816870cfad25dd6a7d3c21
This commit is contained in:
Родитель
11cd4ff18c
Коммит
044a03ec40
|
@ -3908,13 +3908,20 @@ nsDOMWindowUtils::GetCompositorAPZTestData(JSContext* aContext,
|
|||
if (!lm) {
|
||||
return NS_OK;
|
||||
}
|
||||
APZTestData compositorSideData;
|
||||
if (ClientLayerManager* clm = lm->AsClientLayerManager()) {
|
||||
APZTestData compositorSideData;
|
||||
clm->GetCompositorSideAPZTestData(&compositorSideData);
|
||||
if (!compositorSideData.ToJS(aOutCompositorTestData, aContext)) {
|
||||
} else if (WebRenderLayerManager* wrlm = lm->AsWebRenderLayerManager()) {
|
||||
if (!wrlm->WrBridge()) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
if (!wrlm->WrBridge()->SendGetAPZTestData(&compositorSideData)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
if (!compositorSideData.ToJS(aOutCompositorTestData, aContext)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -14,6 +14,7 @@ include WebRenderMessages;
|
|||
include protocol PCompositorBridge;
|
||||
include protocol PTexture;
|
||||
|
||||
using mozilla::layers::APZTestData from "mozilla/layers/APZTestData.h";
|
||||
using struct mozilla::layers::ScrollableLayerGuid from "FrameMetrics.h";
|
||||
using struct mozilla::layers::TextureInfo from "mozilla/layers/CompositorTypes.h";
|
||||
using mozilla::layers::CompositableHandle from "mozilla/layers/LayersTypes.h";
|
||||
|
@ -76,6 +77,7 @@ parent:
|
|||
sync SetAsyncScrollOffset(ViewID scrollId, float x, float y);
|
||||
sync SetAsyncZoom(ViewID scrollId, float zoom);
|
||||
async FlushApzRepaints();
|
||||
sync GetAPZTestData() returns (APZTestData data);
|
||||
|
||||
async Shutdown();
|
||||
child:
|
||||
|
|
|
@ -768,6 +768,13 @@ WebRenderBridgeParent::RecvFlushApzRepaints()
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
WebRenderBridgeParent::RecvGetAPZTestData(APZTestData* aOutData)
|
||||
{
|
||||
mCompositorBridge->GetAPZTestData(GetLayersId(), aOutData);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderBridgeParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
|
|
|
@ -126,6 +126,7 @@ public:
|
|||
mozilla::ipc::IPCResult RecvSetAsyncZoom(const FrameMetrics::ViewID& aScrollId,
|
||||
const float& aZoom) override;
|
||||
mozilla::ipc::IPCResult RecvFlushApzRepaints() override;
|
||||
mozilla::ipc::IPCResult RecvGetAPZTestData(APZTestData* data) override;
|
||||
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
void SetWebRenderProfilerEnabled(bool aEnabled);
|
||||
|
|
Загрузка…
Ссылка в новой задаче