зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1436020 - Disable WebRender profiler UI during readback r=nical
This commit is contained in:
Родитель
3efc420b11
Коммит
71d9e881b1
|
@ -239,7 +239,7 @@ NotifyDidRender(layers::CompositorBridgeParentBase* aBridge,
|
|||
}
|
||||
|
||||
void
|
||||
RenderThread::UpdateAndRender(wr::WindowId aWindowId)
|
||||
RenderThread::UpdateAndRender(wr::WindowId aWindowId, bool aReadback)
|
||||
{
|
||||
AUTO_PROFILER_TRACING("Paint", "Composite");
|
||||
MOZ_ASSERT(IsInRenderThread());
|
||||
|
@ -253,7 +253,7 @@ RenderThread::UpdateAndRender(wr::WindowId aWindowId)
|
|||
auto& renderer = it->second;
|
||||
TimeStamp start = TimeStamp::Now();
|
||||
|
||||
bool ret = renderer->UpdateAndRender();
|
||||
bool ret = renderer->UpdateAndRender(aReadback);
|
||||
if (!ret) {
|
||||
// Render did not happen, do not call NotifyDidRender.
|
||||
return;
|
||||
|
|
|
@ -127,7 +127,7 @@ public:
|
|||
void RunEvent(wr::WindowId aWindowId, UniquePtr<RendererEvent> aCallBack);
|
||||
|
||||
/// Can only be called from the render thread.
|
||||
void UpdateAndRender(wr::WindowId aWindowId);
|
||||
void UpdateAndRender(wr::WindowId aWindowId, bool aReadback = false);
|
||||
|
||||
void Pause(wr::WindowId aWindowId);
|
||||
bool Resume(wr::WindowId aWindowId);
|
||||
|
|
|
@ -88,9 +88,13 @@ RendererOGL::Update()
|
|||
}
|
||||
|
||||
bool
|
||||
RendererOGL::UpdateAndRender()
|
||||
RendererOGL::UpdateAndRender(bool aReadback)
|
||||
{
|
||||
uint32_t flags = gfx::gfxVars::WebRenderDebugFlags();
|
||||
// Disable debug flags during readback
|
||||
if (aReadback) {
|
||||
flags = 0;
|
||||
}
|
||||
|
||||
if (mDebugFlags.mBits != flags) {
|
||||
mDebugFlags.mBits = flags;
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
void Update();
|
||||
|
||||
/// This can be called on the render thread only.
|
||||
bool UpdateAndRender();
|
||||
bool UpdateAndRender(bool aReadback);
|
||||
|
||||
/// This can be called on the render thread only.
|
||||
bool RenderToTarget(gfx::DrawTarget& aTarget);
|
||||
|
|
|
@ -400,7 +400,7 @@ WebRenderAPI::Readback(gfx::IntSize size,
|
|||
|
||||
virtual void Run(RenderThread& aRenderThread, WindowId aWindowId) override
|
||||
{
|
||||
aRenderThread.UpdateAndRender(aWindowId);
|
||||
aRenderThread.UpdateAndRender(aWindowId, /* aReadback */ true);
|
||||
wr_renderer_readback(aRenderThread.GetRenderer(aWindowId)->GetRenderer(),
|
||||
mSize.width, mSize.height, mBuffer, mBufferSize);
|
||||
layers::AutoCompleteTask complete(mTask);
|
||||
|
|
Загрузка…
Ссылка в новой задаче