Backed out changeset bc9031f59e1c (bug 1021248) for Werror bustage

This commit is contained in:
Wes Kocher 2014-06-11 14:46:59 -07:00
Родитель 156cf669e2
Коммит 564838b170
1 изменённых файлов: 18 добавлений и 2 удалений

Просмотреть файл

@ -120,6 +120,8 @@ TiledContentClient::UseTiledLayerBuffer(TiledBufferType aType)
}
SharedFrameMetricsHelper::SharedFrameMetricsHelper()
: mLastProgressiveUpdateWasLowPrecision(false)
, mProgressiveUpdateWasInDanger(false)
{
MOZ_COUNT_CTOR(SharedFrameMetricsHelper);
}
@ -163,6 +165,17 @@ SharedFrameMetricsHelper::UpdateFromCompositorFrameMetrics(
aCompositionBounds = ParentLayerRect(compositorMetrics.mCompositionBounds);
aZoom = compositorMetrics.GetZoomToParent();
// Reset the checkerboard risk flag when switching to low precision
// rendering.
if (aLowPrecision && !mLastProgressiveUpdateWasLowPrecision) {
// Skip low precision rendering until we're at risk of checkerboarding.
if (!mProgressiveUpdateWasInDanger) {
return true;
}
mProgressiveUpdateWasInDanger = false;
}
mLastProgressiveUpdateWasLowPrecision = aLowPrecision;
// Always abort updates if the resolution has changed. There's no use
// in drawing at the incorrect resolution.
if (!FuzzyEquals(compositorMetrics.GetZoom().scale, contentMetrics.GetZoom().scale)) {
@ -184,8 +197,11 @@ SharedFrameMetricsHelper::UpdateFromCompositorFrameMetrics(
// When not a low precision pass and the page is in danger of checker boarding
// abort update.
if (!aLowPrecision && AboutToCheckerboard(contentMetrics, compositorMetrics)) {
return true;
if (!aLowPrecision && !mProgressiveUpdateWasInDanger) {
if (AboutToCheckerboard(contentMetrics, compositorMetrics)) {
mProgressiveUpdateWasInDanger = true;
return true;
}
}
// Abort drawing stale low-precision content if there's a more recent