Bug 730687 - Hook up the aboutToCheckerboard code again. r=Cwiiis

This commit is contained in:
Kartikaya Gupta 2012-02-28 16:14:14 -05:00
Родитель f19d6bf5f7
Коммит 8c468e8078
2 изменённых файлов: 16 добавлений и 6 удалений

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

@ -211,6 +211,15 @@ public class GeckoLayerClient implements GeckoEventResponder,
}
}
RectF getDisplayPort() {
RectF displayPort = new RectF(mRootLayer.getPosition());
displayPort.left -= mDisplayPortMargins.left;
displayPort.top -= mDisplayPortMargins.top;
displayPort.right += mDisplayPortMargins.right;
displayPort.bottom += mDisplayPortMargins.bottom;
return displayPort;
}
/* Informs Gecko that the screen size has changed. */
private void sendResizeEventIfNecessary(boolean force) {
Log.d(LOGTAG, "### sendResizeEventIfNecessary " + force);

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

@ -326,15 +326,16 @@ public class LayerController {
* would prefer that the action didn't take place.
*/
public boolean getRedrawHint() {
// FIXME: Allow redraw while a finger is down, but only if we're about to checkerboard.
// This requires fixing aboutToCheckerboard() to know about the new buffer size.
if (mForceRedraw) {
mForceRedraw = false;
return true;
}
return mPanZoomController.getRedrawHint();
if (!mPanZoomController.getRedrawHint()) {
return false;
}
return aboutToCheckerboard();
}
// Returns true if a checkerboard is about to be visible.
@ -349,8 +350,8 @@ public class LayerController {
if (adjustedViewport.right > pageSize.width) adjustedViewport.right = pageSize.width;
if (adjustedViewport.bottom > pageSize.height) adjustedViewport.bottom = pageSize.height;
RectF tileRect = (mRootLayer == null ? new RectF() : new RectF(mRootLayer.getPosition()));
return !tileRect.contains(adjustedViewport);
RectF displayPort = (mLayerClient == null ? new RectF() : mLayerClient.getDisplayPort());
return !displayPort.contains(adjustedViewport);
}
/**