mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1570869
- Inline FrameRenderingComplete into HandleFrameOneDoc. r=nical
Depends on D40374 Differential Revision: https://phabricator.services.mozilla.com/D40375 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
d4aaf327fd
commit
dd7b882fd0
@ -320,7 +320,24 @@ void RenderThread::HandleFrameOneDoc(wr::WindowId aWindowId, bool aRender) {
|
||||
/* aReadbackSize */ Nothing(),
|
||||
/* aReadbackFormat */ Nothing(),
|
||||
/* aReadbackBuffer */ Nothing(), hadSlowFrame);
|
||||
FrameRenderingComplete(aWindowId);
|
||||
|
||||
{ // scope lock
|
||||
auto windows = mWindowInfos.Lock();
|
||||
auto it = windows->find(AsUint64(aWindowId));
|
||||
if (it == windows->end()) {
|
||||
MOZ_ASSERT(false);
|
||||
return;
|
||||
}
|
||||
WindowInfo* info = it->second;
|
||||
info->mPendingFrames.pop();
|
||||
info->mIsRendering = false;
|
||||
}
|
||||
|
||||
// The start time is from WebRenderBridgeParent::CompositeToTarget. From that
|
||||
// point until now (when the frame is finally pushed to the screen) is
|
||||
// equivalent to the COMPOSITE_TIME metric in the non-WR codepath.
|
||||
mozilla::Telemetry::AccumulateTimeDelta(mozilla::Telemetry::COMPOSITE_TIME,
|
||||
frame.mStartTime);
|
||||
}
|
||||
|
||||
void RenderThread::WakeUp(wr::WindowId aWindowId) {
|
||||
@ -546,31 +563,6 @@ void RenderThread::IncPendingFrameCount(wr::WindowId aWindowId,
|
||||
PendingFrameInfo{aStartTime, aStartId, 0, aDocFrameCount, false});
|
||||
}
|
||||
|
||||
void RenderThread::FrameRenderingComplete(wr::WindowId aWindowId) {
|
||||
auto windows = mWindowInfos.Lock();
|
||||
auto it = windows->find(AsUint64(aWindowId));
|
||||
if (it == windows->end()) {
|
||||
MOZ_ASSERT(false);
|
||||
return;
|
||||
}
|
||||
WindowInfo* info = it->second;
|
||||
MOZ_ASSERT(info->PendingCount() > 0);
|
||||
MOZ_ASSERT(info->mIsRendering);
|
||||
if (info->PendingCount() <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
PendingFrameInfo frame = std::move(info->mPendingFrames.front());
|
||||
info->mPendingFrames.pop();
|
||||
info->mIsRendering = false;
|
||||
|
||||
// The start time is from WebRenderBridgeParent::CompositeToTarget. From that
|
||||
// point until now (when the frame is finally pushed to the screen) is
|
||||
// equivalent to the COMPOSITE_TIME metric in the non-WR codepath.
|
||||
mozilla::Telemetry::AccumulateTimeDelta(mozilla::Telemetry::COMPOSITE_TIME,
|
||||
frame.mStartTime);
|
||||
}
|
||||
|
||||
void RenderThread::NotifySlowFrame(wr::WindowId aWindowId) {
|
||||
auto windows = mWindowInfos.Lock();
|
||||
auto it = windows->find(AsUint64(aWindowId));
|
||||
|
@ -225,8 +225,6 @@ class RenderThread final {
|
||||
void IncPendingFrameCount(wr::WindowId aWindowId, const VsyncId& aStartId,
|
||||
const TimeStamp& aStartTime,
|
||||
uint8_t aDocFrameCount);
|
||||
/// Can be called from any thread.
|
||||
void FrameRenderingComplete(wr::WindowId aWindowId);
|
||||
|
||||
void NotifySlowFrame(wr::WindowId aWindowId);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user