Bug 844275 - Ensure that the GeckoLayerClient always starts off with an accurate viewport size. r=Cwiiis

This commit is contained in:
Kartikaya Gupta 2013-02-28 13:28:23 -05:00
parent b826f2ae40
commit e385c3c091
3 changed files with 2 additions and 14 deletions

View File

@ -87,15 +87,6 @@ public class GLController {
}
mEGLConfig = chooseConfig();
// updating the state in the view/controller/client should be
// done on the main UI thread, not the GL renderer thread
mView.post(new Runnable() {
@Override
public void run() {
mView.setViewportSize(mWidth, mHeight);
}
});
}
private EGLConfig chooseConfig() {

View File

@ -111,7 +111,8 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
mForceRedraw = true;
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
mViewportMetrics = new ImmutableViewportMetrics(displayMetrics);
mViewportMetrics = new ImmutableViewportMetrics(displayMetrics)
.setViewportSize(view.getWidth(), view.getHeight());
mZoomConstraints = new ZoomConstraints(false);
mPanZoomController = PanZoomController.Factory.create(this, view, eventDispatcher);

View File

@ -228,10 +228,6 @@ public class LayerView extends FrameLayout {
mLayerClient.setZoomConstraints(constraints);
}
public void setViewportSize(int width, int height) {
mLayerClient.setViewportSize(width, height);
}
public void setInputConnectionHandler(InputConnectionHandler inputConnectionHandler) {
mInputConnectionHandler = inputConnectionHandler;
mLayerClient.forceRedraw();