Bug 950487 - Remove unnecessary UpdateCompositionBounds function on APZC. r=Cwiiis

This commit is contained in:
Kartikaya Gupta
2013-12-17 14:25:57 -05:00
parent 6962500778
commit c14ef68827
7 changed files with 0 additions and 112 deletions

View File

@@ -1483,28 +1483,6 @@ const FrameMetrics& AsyncPanZoomController::GetFrameMetrics() {
return mFrameMetrics;
}
void AsyncPanZoomController::UpdateCompositionBounds(const ScreenIntRect& aCompositionBounds) {
ReentrantMonitorAutoEnter lock(mMonitor);
ScreenIntRect oldCompositionBounds = mFrameMetrics.mCompositionBounds;
mFrameMetrics.mCompositionBounds = aCompositionBounds;
// If the window had 0 dimensions before, or does now, we don't want to
// repaint or update the zoom since we'll run into rendering issues and/or
// divide-by-zero. This manifests itself as the screen flashing. If the page
// has gone out of view, the buffer will be cleared elsewhere anyways.
if (aCompositionBounds.width && aCompositionBounds.height &&
oldCompositionBounds.width && oldCompositionBounds.height) {
float adjustmentFactor = float(aCompositionBounds.width) / float(oldCompositionBounds.width);
mFrameMetrics.mZoom.scale =
clamped(mFrameMetrics.mZoom.scale * adjustmentFactor,
mMinZoom.scale, mMaxZoom.scale);
// Repaint on a rotation so that our new resolution gets properly updated.
RequestContentRepaint();
}
}
void AsyncPanZoomController::ZoomToRect(CSSRect aRect) {
SetState(ANIMATING_ZOOM);