Bug 732564 - Take out java-side draw suppression on rotation as it often prevents redrawing completely; we can put this back later if needed. r=Cwiiis
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 12 Mar 2012 12:03:38 -0400
changeset 89326 212f97fe62cb8f6a31f40c34aec5a50b9511250e
parent 89325 8bcc8f581217f544a25b008863e3520da7ee53f6
child 89327 be7d515d7902018b3b78845f9cc90ca32c356ef9
push id22242
push userkgupta@mozilla.com
push dateWed, 14 Mar 2012 15:19:09 +0000
treeherdermozilla-central@936ef50fa498 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCwiiis
bugs732564
milestone13.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 732564 - Take out java-side draw suppression on rotation as it often prevents redrawing completely; we can put this back later if needed. r=Cwiiis
mobile/android/base/gfx/GeckoLayerClient.java
--- a/mobile/android/base/gfx/GeckoLayerClient.java
+++ b/mobile/android/base/gfx/GeckoLayerClient.java
@@ -72,18 +72,16 @@ public class GeckoLayerClient implements
     private Rect mDisplayPortMargins;
 
     private VirtualLayer mRootLayer;
 
     /* The viewport that Gecko is currently displaying. */
     private ViewportMetrics mGeckoViewport;
 
     private boolean mViewportSizeChanged;
-    private boolean mIgnorePaintsPendingViewportSizeChange;
-    private boolean mFirstPaint = true;
 
     private String mLastCheckerboardColor;
 
     /* Used by robocop for testing purposes */
     private DrawListener mDrawListener;
 
     /* Used as a temporary ViewTransform by getViewTransform */
     private ViewTransform mCurrentViewTransform;
@@ -116,24 +114,16 @@ public class GeckoLayerClient implements
         LayerView view = layerController.getView();
         view.setListener(this);
 
         mLayerRenderer = new LayerRenderer(view);
     }
 
     /** This function is invoked by Gecko via JNI; be careful when modifying signature. */
     public boolean beginDrawing(int width, int height, String metadata) {
-        // If the viewport has changed but we still don't have the latest viewport
-        // from Gecko, ignore the viewport passed to us from Gecko since that is going
-        // to be wrong.
-        if (!mFirstPaint && mIgnorePaintsPendingViewportSizeChange) {
-            return false;
-        }
-        mFirstPaint = false;
-
         // If we've changed surface types, cancel this draw
         if (initializeVirtualLayer()) {
             Log.e(LOGTAG, "### Cancelling draw due to virtual layer initialization");
             return false;
         }
 
         try {
             JSONObject viewportObject = new JSONObject(metadata);
@@ -224,17 +214,16 @@ public class GeckoLayerClient implements
     }
 
     public Bitmap getBitmap() {
         return null;
     }
 
     void viewportSizeChanged() {
         mViewportSizeChanged = true;
-        mIgnorePaintsPendingViewportSizeChange = true;
     }
 
     private void adjustViewport() {
         ViewportMetrics viewportMetrics =
             new ViewportMetrics(mLayerController.getViewportMetrics());
 
         viewportMetrics.setViewport(viewportMetrics.getClampedViewport());
 
@@ -243,18 +232,16 @@ public class GeckoLayerClient implements
             mViewportSizeChanged = false;
             GeckoAppShell.viewSizeChanged();
         }
     }
 
     /** Implementation of GeckoEventResponder/GeckoEventListener. */
     public void handleMessage(String event, JSONObject message) {
         if ("Viewport:Update".equals(event)) {
-            mIgnorePaintsPendingViewportSizeChange = false;
-
             try {
                 ViewportMetrics newMetrics = new ViewportMetrics(message);
                 synchronized (mLayerController) {
                     // keep the old viewport size, but update everything else
                     ImmutableViewportMetrics oldMetrics = mLayerController.getViewportMetrics();
                     newMetrics.setSize(oldMetrics.getSize());
                     mLayerController.setViewportMetrics(newMetrics);
                     mLayerController.abortPanZoomAnimation();