commit e137d4f56464c260bb801ee4ae04fdffaf751356
Author: Leszek Koltunski <leszek@distoretedandroid.org>
Date:   Tue Apr 11 14:23:17 2017 +0100

    Minor.

diff --git a/src/main/java/org/distorted/library/DistortedOutputSurface.java b/src/main/java/org/distorted/library/DistortedOutputSurface.java
index 040dac1..9957bf5 100644
--- a/src/main/java/org/distorted/library/DistortedOutputSurface.java
+++ b/src/main/java/org/distorted/library/DistortedOutputSurface.java
@@ -121,16 +121,13 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
     {
     int numRenders = 0;
     DistortedNode child;
-    EffectQueuePostprocess lastP=null, currP=null;
-    long lastB=0, currB=0;
+    EffectQueuePostprocess lastP=null, currP;
+    long lastB=0, currB;
 
     // Render all children, one by one.
     // If there are no postprocessing effects, just render to THIS.
     // Otherwise, render to a buffer and on each change of Postprocessing Bucket,
     // apply the postprocessing to a whole buffer and merge it.
-    //
-    // TODO: in order for this to be efficient, the children really need to be sorted
-    // to keep the same Buckets together.
 
     for(int i=0; i<num; i++)
       {
@@ -138,15 +135,9 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
       currP = child.getPostprocess();
       currB = currP.getBucket();
 
-      if( i>0 && currB!=lastB )
-        {
-        numRenders += lastP.postprocess(time,this);
-        }
+      if( i>0 && currB!=lastB ) numRenders += lastP.postprocess(time,this);
 
-      if( currB==0 )
-        {
-        numRenders += child.draw(time,this);
-        }
+      if( currB==0 ) numRenders += child.draw(time,this);
       else
         {
         if( mBuffer1==null )
@@ -156,17 +147,13 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
           }
 
         numRenders += child.draw(time,mBuffer1);
+        if( i==num-1 ) numRenders += currP.postprocess(time,this);
         }
 
       lastP = currP;
       lastB = currB;
       }
 
-    if( currB!=0 )
-      {
-      numRenders += currP.postprocess(time,this);
-      }
-
     return numRenders;
     }
 
