Bug 758635 - Move a call to resizeView so that we don't send two resize events to gecko when the keyboard comes up. r=jrmuizel

This commit is contained in:
Kartikaya Gupta
2012-06-03 17:50:00 -04:00
parent 8d5cb22fce
commit 2e641fd793
2 changed files with 7 additions and 16 deletions

View File

@@ -104,7 +104,6 @@ public class GLController {
synchronized void surfaceChanged(int newWidth, int newHeight) {
mWidth = newWidth;
mHeight = newHeight;
mView.getRenderer().resizeView(mWidth, mHeight);
mSurfaceValid = true;
notifyAll();
}
@@ -119,9 +118,13 @@ public class GLController {
mEGLConfig = chooseConfig();
if (mView.getRenderer() != null) {
mView.getRenderer().resizeView(mWidth, mHeight);
}
// 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() {
public void run() {
mView.setViewportSize(new IntSize(mWidth, mHeight));
}
});
}
private EGLConfig chooseConfig() {

View File

@@ -313,18 +313,6 @@ public class LayerRenderer {
mCoordBuffer);
}
public void resizeView(final int width, final int height) {
// 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() {
public void run() {
mView.setViewportSize(new IntSize(width, height));
}
});
/* TODO: Throw away tile images? */
}
private void updateDroppedFrames(long frameStartTime) {
int frameElapsedTime = (int)(SystemClock.uptimeMillis() - frameStartTime);