Bug 742731. Remove performUpdates return value. r=kats
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 05 Apr 2012 11:32:16 -0400
changeset 95074 07257e5f06d5eaf8cfb181fb031253fade92bbbe
parent 95073 6256b17dd252f141b249fb6375eca0324ae02bdf
child 95075 2b06484c231c230f6f57441ba730945ac9858f19
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs742731
milestone14.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 742731. Remove performUpdates return value. r=kats No need to have a return value if it's always going to be true.
mobile/android/base/gfx/Layer.java
mobile/android/base/gfx/SurfaceTextureLayer.java
mobile/android/base/gfx/TileLayer.java
--- a/mobile/android/base/gfx/Layer.java
+++ b/mobile/android/base/gfx/Layer.java
@@ -77,17 +77,18 @@ public abstract class Layer {
     public final boolean update(RenderContext context) {
         if (mTransactionLock.isHeldByCurrentThread()) {
             throw new RuntimeException("draw() called while transaction lock held by this " +
                                        "thread?!");
         }
 
         if (mTransactionLock.tryLock()) {
             try {
-                return performUpdates(context);
+                performUpdates(context);
+                return true;
             } finally {
                 mTransactionLock.unlock();
             }
         }
 
         return false;
     }
 
@@ -165,27 +166,25 @@ public abstract class Layer {
     }
 
     /**
      * 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 boolean performUpdates(RenderContext context) {
+    protected void performUpdates(RenderContext context) {
         if (mNewPosition != null) {
             mPosition = mNewPosition;
             mNewPosition = null;
         }
         if (mNewResolution != 0.0f) {
             mResolution = mNewResolution;
             mNewResolution = 0.0f;
         }
-
-        return true;
     }
 
     public static class RenderContext {
         public final RectF viewport;
         public final FloatSize pageSize;
         public final float zoomFactor;
         public final int positionHandle;
         public final int textureHandle;
--- a/mobile/android/base/gfx/SurfaceTextureLayer.java
+++ b/mobile/android/base/gfx/SurfaceTextureLayer.java
@@ -172,23 +172,21 @@ public class SurfaceTextureLayer extends
                 Log.e(LOGTAG, "some other exception while invoking release method on mSurfaceTexture", e);
             }
         }
         if (mTextureId > 0)
             TextureReaper.get().add(mTextureId);
     }
 
     @Override
-    protected boolean performUpdates(RenderContext context) {
+    protected void performUpdates(RenderContext context) {
         super.performUpdates(context);
 
         mInverted = mNewInverted;
         mBlend = mNewBlend;
-
-        return true;
     }
 
     private static boolean ensureProgram() {
         if (mProgram != 0)
             return true;
 
         int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, VERTEX_SHADER);
         int fragmentShader = loadShader(GLES20.GL_FRAGMENT_SHADER, FRAGMENT_SHADER_OES);
--- a/mobile/android/base/gfx/TileLayer.java
+++ b/mobile/android/base/gfx/TileLayer.java
@@ -125,36 +125,34 @@ public abstract class TileLayer extends 
                 // Free the texture immediately, so we don't incur a
                 // temporarily increased memory usage.
                 TextureReaper.get().reap();
             }
         }
     }
 
     @Override
-    protected boolean performUpdates(RenderContext context) {
+    protected void performUpdates(RenderContext context) {
         super.performUpdates(context);
 
         // Reallocate the texture if the size has changed
         validateTexture();
 
         // Don't do any work if the image has an invalid size.
         if (!mImage.getSize().isPositive())
-            return true;
+            return;
 
         // If we haven't allocated a texture, assume the whole region is dirty
         if (mTextureIDs == null) {
             uploadFullTexture();
         } else {
             uploadDirtyRect(mDirtyRect);
         }
 
         mDirtyRect.setEmpty();
-
-        return true;
     }
 
     private void uploadFullTexture() {
         IntSize bufferSize = mImage.getSize();
         uploadDirtyRect(new Rect(0, 0, bufferSize.width, bufferSize.height));
     }
 
     private void uploadDirtyRect(Rect dirtyRect) {