Bug 1031107 - Part 8: Set display ports on tiled scrollable layers. r=tn

This commit is contained in:
Matt Woodrow 2014-07-24 15:14:39 +12:00
parent d5035d8cda
commit 8a776bf27a

View File

@ -1604,6 +1604,24 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter,
}
EnsureImageVisPrefsCached();
#ifndef MOZ_WIDGET_ANDROID
if (mScrollingActive &&
gfxPrefs::LayersTilesEnabled() &&
!gfxPrefs::AsyncPanZoomEnabled() &&
mOuter->GetContent()) {
// If we have tiling but no APZ, then set a 0-margin display port on
// active scroll containers so that we paint by whole tile increments
// when scrolling.
nsLayoutUtils::SetDisplayPortMargins(mOuter->GetContent(),
mOuter->PresContext()->PresShell(),
LayerMargin(),
gfxPrefs::LayersTileWidth(), gfxPrefs::LayersTileHeight(),
0,
nsLayoutUtils::RepaintMode::DoNotRepaint);
}
#endif
}
ScrollFrameHelper::~ScrollFrameHelper()