Bug 1377688 - Remove RenderThread::NewScrollFrameReady() r=kats

WebRenderBridgeParent::CompositeToTarget() calls WebRenderAPI::GenerateFrame() if it is necessary to trigger UpdateAndRender(). It is not necessary to trigger UpdateAndRender() by new_scroll_frame_ready
This commit is contained in:
sotaro 2017-07-10 10:46:41 +09:00
Родитель e79d584602
Коммит be208a7200
2 изменённых файлов: 4 добавлений и 25 удалений

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

@ -170,26 +170,6 @@ RenderThread::NewFrameReady(wr::WindowId aWindowId)
DecPendingFrameCount(aWindowId);
}
void
RenderThread::NewScrollFrameReady(wr::WindowId aWindowId, bool aCompositeNeeded)
{
if (mHasShutdown) {
return;
}
if (!IsInRenderThread()) {
Loop()->PostTask(NewRunnableMethod<wr::WindowId, bool>(
"wr::RenderThread::NewScrollFrameReady",
this,
&RenderThread::NewScrollFrameReady,
aWindowId,
aCompositeNeeded));
return;
}
UpdateAndRender(aWindowId);
}
void
RenderThread::RunEvent(wr::WindowId aWindowId, UniquePtr<RendererEvent> aEvent)
{
@ -404,8 +384,10 @@ void wr_notifier_new_frame_ready(WrWindowId aWindowId)
void wr_notifier_new_scroll_frame_ready(WrWindowId aWindowId, bool aCompositeNeeded)
{
mozilla::wr::RenderThread::Get()->NewScrollFrameReady(mozilla::wr::WindowId(aWindowId),
aCompositeNeeded);
// It is not necessary to update rendering with new_scroll_frame_ready.
// WebRenderBridgeParent::CompositeToTarget() is implemented to call
// WebRenderAPI::GenerateFrame() if it is necessary to trigger UpdateAndRender().
// See Bug 1377688.
}
void wr_notifier_external_event(WrWindowId aWindowId, size_t aRawEvent)

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

@ -106,9 +106,6 @@ public:
/// Automatically forwarded to the render thread.
void NewFrameReady(wr::WindowId aWindowId);
/// Automatically forwarded to the render thread.
void NewScrollFrameReady(wr::WindowId aWindowId, bool aCompositeNeeded);
/// Automatically forwarded to the render thread.
void PipelineSizeChanged(wr::WindowId aWindowId, uint64_t aPipelineId, float aWidth, float aHeight);