Bug 961289 - Log displayports on client side for APZ testing. r=kats

--HG--
extra : source : 18b0cdfc97633c46f609dbd84a52af6472d4edd4
This commit is contained in:
Botond Ballo 2014-04-21 17:09:30 -04:00
parent 4cea48f1c8
commit 3e2f34ca7d

View File

@ -645,10 +645,13 @@ static void RecordFrameMetrics(nsIFrame* aForFrame,
resolution.scale, resolution.scale, auPerDevPixel);
aRoot->SetVisibleRegion(visible);
nsIPresShell* presShell = presContext->GetPresShell();
FrameMetrics metrics;
metrics.mViewport = CSSRect::FromAppUnits(aViewport);
if (aDisplayPort) {
metrics.mDisplayPort = CSSRect::FromAppUnits(*aDisplayPort);
nsLayoutUtils::LogTestDataForPaint(presShell, aScrollId, "displayport",
metrics.mDisplayPort);
if (aCriticalDisplayPort) {
metrics.mCriticalDisplayPort = CSSRect::FromAppUnits(*aCriticalDisplayPort);
}
@ -679,7 +682,6 @@ static void RecordFrameMetrics(nsIFrame* aForFrame,
// Only the root scrollable frame for a given presShell should pick up
// the presShell's resolution. All the other frames are 1.0.
nsIPresShell* presShell = presContext->GetPresShell();
if (aScrollFrame == presShell->GetRootScrollFrame()) {
metrics.mResolution = ParentLayerToLayerScale(presShell->GetXResolution(),
presShell->GetYResolution());