Bug 767980 - Disable TextureView support in LayerView for now (r=snorp)
authorLucas Rocha <lucasr@mozilla.com>
Fri, 12 Oct 2012 12:57:07 +0100
changeset 110198 913e25c339f80428031686c4d33000182c8e6104
parent 110197 2e416d28e933ab2b7991046d6d7f20025a0fca44
child 110199 9990a1074771f94c9f8a31e890022725f23ae002
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewerssnorp
bugs767980
milestone19.0a1
Bug 767980 - Disable TextureView support in LayerView for now (r=snorp)
mobile/android/base/gfx/LayerView.java
--- a/mobile/android/base/gfx/LayerView.java
+++ b/mobile/android/base/gfx/LayerView.java
@@ -59,30 +59,36 @@ public class LayerView extends FrameLayo
 
     private Listener mListener;
 
     /* Flags used to determine when to show the painted surface. */
     public static final int PAINT_BEFORE_FIRST = 0;
     public static final int PAINT_AFTER_FIRST = 1;
 
     boolean shouldUseTextureView() {
+        // Disable TextureView support for now as it causes panning/zooming
+        // performance regressions (see bug 792259). Uncomment the code below
+        // once this bug is fixed.
+        return false;
+
+        /*
         // we can only use TextureView on ICS or higher
         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
             Log.i(LOGTAG, "Not using TextureView: not on ICS+");
             return false;
         }
 
         try {
             // and then we can only use it if we have a hardware accelerated window
             Method m = View.class.getMethod("isHardwareAccelerated", (Class[]) null);
             return (Boolean) m.invoke(this);
         } catch (Exception e) {
             Log.i(LOGTAG, "Not using TextureView: caught exception checking for hw accel: " + e.toString());
             return false;
-        }
+        } */
     }
 
     public LayerView(Context context, AttributeSet attrs) {
         super(context, attrs);
 
         mGLController = new GLController(this);
         mPaintState = PAINT_BEFORE_FIRST;
         mCheckerboardColor = Color.WHITE;