mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
backout Bug 1297367 because of tart regression, r=backout
This commit is contained in:
parent
e40b66af93
commit
d449074dfe
@ -2581,44 +2581,6 @@ void
|
||||
nsJSContext::NotifyDidPaint()
|
||||
{
|
||||
sDidPaintAfterPreviousICCSlice = true;
|
||||
if (sICCTimer) {
|
||||
static uint32_t sCount = 0;
|
||||
// 16 here is the common value for refresh driver tick frequency.
|
||||
static const uint32_t kTicksPerSliceDelay = kICCIntersliceDelay / 16;
|
||||
if (++sCount % kTicksPerSliceDelay != 0) {
|
||||
// Don't trigger CC slice all the time after paint, but often still.
|
||||
// The key point is to trigger it right after paint, especially when
|
||||
// we're running RefreshDriver constantly.
|
||||
return;
|
||||
}
|
||||
|
||||
sICCTimer->Cancel();
|
||||
ICCTimerFired(nullptr, nullptr);
|
||||
if (sICCTimer) {
|
||||
sICCTimer->InitWithNamedFuncCallback(ICCTimerFired, nullptr,
|
||||
kICCIntersliceDelay,
|
||||
nsITimer::TYPE_REPEATING_SLACK,
|
||||
"ICCTimerFired");
|
||||
}
|
||||
} else if (sCCTimer) {
|
||||
static uint32_t sCount = 0;
|
||||
static const uint32_t kTicksPerForgetSkippableDelay =
|
||||
NS_CC_SKIPPABLE_DELAY / 16;
|
||||
if (++sCount % kTicksPerForgetSkippableDelay != 0) {
|
||||
// The comment above about triggering CC slice applies to forget skippable
|
||||
// too.
|
||||
return;
|
||||
}
|
||||
|
||||
sCCTimer->Cancel();
|
||||
CCTimerFired(nullptr, nullptr);
|
||||
if (sCCTimer) {
|
||||
sCCTimer->InitWithNamedFuncCallback(CCTimerFired, nullptr,
|
||||
NS_CC_SKIPPABLE_DELAY,
|
||||
nsITimer::TYPE_REPEATING_SLACK,
|
||||
"CCTimerFired");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsScriptNameSpaceManager*
|
||||
|
@ -1876,7 +1876,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
||||
}
|
||||
mPresShellsToInvalidateIfHidden.Clear();
|
||||
|
||||
bool notifyGC = false;
|
||||
if (mViewManagerFlushIsPending) {
|
||||
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
||||
|
||||
@ -1912,7 +1911,10 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
||||
timelines->AddMarkerForDocShell(docShell, "Paint", MarkerTracingType::END);
|
||||
}
|
||||
|
||||
notifyGC = true;
|
||||
if (nsContentUtils::XPConnect()) {
|
||||
nsContentUtils::XPConnect()->NotifyDidPaint();
|
||||
nsJSContext::NotifyDidPaint();
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef ANDROID /* bug 1142079 */
|
||||
@ -1932,11 +1934,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
||||
if (mPresContext->IsRoot() && XRE_IsContentProcess() && gfxPrefs::AlwaysPaint()) {
|
||||
ScheduleViewManagerFlush();
|
||||
}
|
||||
|
||||
if (notifyGC && nsContentUtils::XPConnect()) {
|
||||
nsContentUtils::XPConnect()->NotifyDidPaint();
|
||||
nsJSContext::NotifyDidPaint();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user