зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1338347 - Record frame throughput ratio for APZ animations r=botond
MozReview-Commit-ID: 7Ljaya9RFeo --HG-- extra : rebase_source : 13e92c1077cc5f257cce58ab193758395c133292
This commit is contained in:
Родитель
c58659d822
Коммит
dc857723e6
|
@ -19,6 +19,7 @@ AnimationMetricsTracker::AnimationMetricsTracker()
|
|||
: mMaxLayerAreaAnimated(0)
|
||||
, mChromeAnimationFrameCount(0)
|
||||
, mContentAnimationFrameCount(0)
|
||||
, mApzAnimationFrameCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -61,6 +62,18 @@ AnimationMetricsTracker::UpdateAnimationInProgress(AnimationProcessTypes aActive
|
|||
Telemetry::COMPOSITOR_ANIMATION_THROUGHPUT_CONTENT);
|
||||
}
|
||||
|
||||
void
|
||||
AnimationMetricsTracker::UpdateApzAnimationInProgress(bool aInProgress,
|
||||
TimeDuration aVsyncInterval)
|
||||
{
|
||||
UpdateAnimationThroughput("apz",
|
||||
aInProgress,
|
||||
mApzAnimationStart,
|
||||
mApzAnimationFrameCount,
|
||||
aVsyncInterval,
|
||||
Telemetry::COMPOSITOR_ANIMATION_THROUGHPUT_APZ);
|
||||
}
|
||||
|
||||
void
|
||||
AnimationMetricsTracker::AnimationStarted()
|
||||
{
|
||||
|
|
|
@ -38,6 +38,12 @@ public:
|
|||
void UpdateAnimationInProgress(AnimationProcessTypes aActive, uint64_t aLayerArea,
|
||||
TimeDuration aVsyncInterval);
|
||||
|
||||
/**
|
||||
* Similar to UpdateAnimationInProgress, but this is for APZ animations. Again,
|
||||
* this should be called per composite.
|
||||
*/
|
||||
void UpdateApzAnimationInProgress(bool aInProgress, TimeDuration aVsyncInterval);
|
||||
|
||||
private:
|
||||
void AnimationStarted();
|
||||
void AnimationEnded();
|
||||
|
@ -64,6 +70,10 @@ private:
|
|||
TimeStamp mContentAnimationStart;
|
||||
// The number of frames composited for the current content-process animation.
|
||||
uint32_t mContentAnimationFrameCount;
|
||||
// The start time of the current APZ animation.
|
||||
TimeStamp mApzAnimationStart;
|
||||
// The number of frames composited for the current APZ animation.
|
||||
uint32_t mApzAnimationFrameCount;
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
|
|
|
@ -1411,7 +1411,9 @@ AsyncCompositionManager::TransformShadowTree(TimeStamp aCurrentFrame,
|
|||
nextFrame += aVsyncRate;
|
||||
}
|
||||
|
||||
wantNextFrame |= SampleAPZAnimations(LayerMetricsWrapper(root), nextFrame);
|
||||
bool apzAnimating = SampleAPZAnimations(LayerMetricsWrapper(root), nextFrame);
|
||||
mAnimationMetricsTracker.UpdateApzAnimationInProgress(apzAnimating, aVsyncRate);
|
||||
wantNextFrame |= apzAnimating;
|
||||
}
|
||||
|
||||
HostLayer* rootComposite = root->AsHostLayer();
|
||||
|
|
Загрузка…
Ссылка в новой задаче