Bug 758635 - Remove redundant code to set the viewport size. r=Cwiiis
authorKartikaya Gupta <kgupta@mozilla.com>
Sat, 26 May 2012 10:59:11 -0400
changeset 95025 6c27b32ad788184acc0deafaa2741bafc94ba436
parent 95024 be42b12c6092998d6d7c7684d05856f21e20fe32
child 95026 d22c4f57daaf73720ae3a5e5ff17e19a74a0fdca
push id9923
push userkgupta@mozilla.com
push dateSat, 26 May 2012 15:03:57 +0000
treeherdermozilla-inbound@d22c4f57daaf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCwiiis
bugs758635
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 758635 - Remove redundant code to set the viewport size. r=Cwiiis
mobile/android/base/gfx/LayerRenderer.java
mobile/android/base/gfx/LayerView.java
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -326,24 +326,16 @@ public class LayerRenderer implements GL
 
     public void onSurfaceChanged(GL10 gl, final int width, final int height) {
         GLES20.glViewport(0, 0, width, height);
 
         if (mFrameRateLayer != null) {
             moveFrameRateLayer(width, 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);
 
         /* Update the running statistics. */
         mFrameTimingsSum -= mFrameTimings[mCurrentFrame];
--- a/mobile/android/base/gfx/LayerView.java
+++ b/mobile/android/base/gfx/LayerView.java
@@ -85,21 +85,16 @@ public class LayerView extends SurfaceVi
             GeckoApp.mFormAssistPopup.hide();
 
         return mTouchEventHandler.handleEvent(event);
     }
 
     public LayerController getController() { return mController; }
     public TouchEventHandler getTouchEventHandler() { return mTouchEventHandler; }
 
-    /** The LayerRenderer calls this to indicate that the window has changed size. */
-    public void setViewportSize(IntSize size) {
-        mController.setViewportSize(new FloatSize(size));
-    }
-
     public GeckoInputConnection setInputConnectionHandler() {
         GeckoInputConnection geckoInputConnection = GeckoInputConnection.create(this);
         mInputConnectionHandler = geckoInputConnection;
         return geckoInputConnection;
     }
 
     @Override
     public InputConnection onCreateInputConnection(EditorInfo outAttrs) {