Backed out changeset e40a4d279e30 (bug 1098096) for Android bustage.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 25 Nov 2014 16:36:51 -0500
changeset 234035 a2e2a71b22289102b001d84204b9357c7ca65143
parent 234034 4af988d1770fc743911bd26782eac367c1ddf095
child 234036 fef3ceebcfbcbe5f9ae19b68316f82c35586e87e
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1098096
milestone35.0a2
backs oute40a4d279e30d773683c63e5300b348245c26c83
Backed out changeset e40a4d279e30 (bug 1098096) for Android bustage.
mobile/android/base/gfx/OverscrollEdgeEffect.java
--- a/mobile/android/base/gfx/OverscrollEdgeEffect.java
+++ b/mobile/android/base/gfx/OverscrollEdgeEffect.java
@@ -4,63 +4,38 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.gfx;
 
 import org.mozilla.gecko.AppConstants.Versions;
 
 import android.content.Context;
 import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffXfermode;
 import android.view.View;
 import android.widget.EdgeEffect;
 
-import java.lang.reflect.Field;
 
 public class OverscrollEdgeEffect implements Overscroll {
     // Used to index particular edges in the edges array
     private static final int TOP = 0;
     private static final int BOTTOM = 1;
     private static final int LEFT = 2;
     private static final int RIGHT = 3;
 
     // All four edges of the screen
     private final EdgeEffect[] mEdges = new EdgeEffect[4];
 
     // The view we're showing this overscroll on.
     private final View mView;
 
     public OverscrollEdgeEffect(final View v) {
-        Field paintField = null;
-        if (Versions.feature21Plus) {
-            try {
-                paintField = EdgeEffect.class.getDeclaredField("mPaint");
-                paintField.setAccessible(true);
-            } catch (NoSuchFieldException e) {
-            }
-        }
-
         mView = v;
         Context context = v.getContext();
         for (int i = 0; i < 4; i++) {
             mEdges[i] = new EdgeEffect(context);
-
-            try {
-                if (paintField != null) {
-                    final Paint p = (Paint) paintField.get(mEdges[i]);
-
-                    // The Android EdgeEffect class uses a mode of SRC_ATOP here, which means it will only
-                    // draw the effect where there are non-transparent pixels in the destination. Since the LayerView
-                    // itself is fully transparent, it doesn't display at all. We need to use SRC instead.
-                    p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
-                }
-            } catch (IllegalAccessException e) {
-            }
         }
     }
 
     @Override
     public void setSize(final int width, final int height) {
         mEdges[LEFT].setSize(height, width);
         mEdges[RIGHT].setSize(height, width);
         mEdges[TOP].setSize(width, height);