Bug 820556 - Kill mUsesDefaultProgram which is always true. r=snorp
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 11 Dec 2012 17:33:09 -0500
changeset 115712 a41a29550c44067a34093483a8e0b36cfb227d3d
parent 115711 9602f98a6a7035f6681cf10e03ab443e06606709
child 115713 2fd28dc82cc010576a337cfbe8d1ec4774ea0f53
push id24020
push useremorley@mozilla.com
push dateWed, 12 Dec 2012 10:01:41 +0000
treeherdermozilla-central@634180132e68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs820556
milestone20.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 820556 - Kill mUsesDefaultProgram which is always true. r=snorp
mobile/android/base/gfx/Layer.java
mobile/android/base/gfx/LayerRenderer.java
--- a/mobile/android/base/gfx/Layer.java
+++ b/mobile/android/base/gfx/Layer.java
@@ -17,17 +17,16 @@ import java.util.concurrent.locks.Reentr
 public abstract class Layer {
     private final ReentrantLock mTransactionLock;
     private boolean mInTransaction;
     private Rect mNewPosition;
     private float mNewResolution;
 
     protected Rect mPosition;
     protected float mResolution;
-    protected boolean mUsesDefaultProgram = true;
 
     public Layer() {
         this(null);
     }
 
     public Layer(IntSize size) {
         mTransactionLock = new ReentrantLock();
         if (size == null) {
@@ -128,20 +127,16 @@ public abstract class Layer {
      * the reciprocal of the resolution in the layer's transform() function.
      * Only valid inside a transaction. */
     public void setResolution(float newResolution) {
         if (!mInTransaction)
             throw new RuntimeException("setResolution() is only valid inside a transaction");
         mNewResolution = newResolution;
     }
 
-    public boolean usesDefaultProgram() {
-        return mUsesDefaultProgram;
-    }
-
     /**
      * Subclasses may override this method to perform custom layer updates. This will be called
      * with the transaction lock held. Subclass implementations of this method must call the
      * superclass implementation. Returns false if there is still work to be done after this
      * update is complete.
      */
     protected void performUpdates(RenderContext context) {
         if (mNewPosition != null) {
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -571,23 +571,17 @@ public class LayerRenderer implements Ta
             rootLayer.draw(mPageContext);
         }
 
         /** This function is invoked via JNI; be careful when modifying signature. */
         public void drawForeground() {
             /* Draw any extra layers that were added (likely plugins) */
             if (mExtraLayers.size() > 0) {
                 for (Layer layer : mExtraLayers) {
-                    if (!layer.usesDefaultProgram())
-                        deactivateDefaultProgram();
-
                     layer.draw(mPageContext);
-
-                    if (!layer.usesDefaultProgram())
-                        activateDefaultProgram();
                 }
             }
 
             /* Draw the vertical scrollbar. */
             if (mPageRect.height() > mFrameMetrics.getHeight())
                 mVertScrollLayer.draw(mPageContext);
 
             /* Draw the horizontal scrollbar. */