mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
Bug 844275 - Ensure that the GeckoLayerClient always starts off with an accurate viewport size. r=Cwiiis
This commit is contained in:
parent
b826f2ae40
commit
e385c3c091
@ -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() {
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user