commit e02264ff4e1907a3ffb8cd3bbd4aeddceee4f709
Author: leszek <leszek@koltunski.pl>
Date:   Thu Apr 13 22:18:52 2017 +0100

    Bugfix (before we couldn't call postprocess() more than once per frame)

diff --git a/src/main/java/org/distorted/library/DistortedEffectsPostprocess.java b/src/main/java/org/distorted/library/DistortedEffectsPostprocess.java
index 3df9997..6e44931 100644
--- a/src/main/java/org/distorted/library/DistortedEffectsPostprocess.java
+++ b/src/main/java/org/distorted/library/DistortedEffectsPostprocess.java
@@ -67,13 +67,6 @@ public class DistortedEffectsPostprocess
     return mP;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  int postprocessPriv(long currTime, DistortedOutputSurface surface)
-    {
-    return mP.postprocess(currTime,surface);
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   private void releasePriv()
diff --git a/src/main/java/org/distorted/library/DistortedOutputSurface.java b/src/main/java/org/distorted/library/DistortedOutputSurface.java
index a4c0786..6a53e1e 100644
--- a/src/main/java/org/distorted/library/DistortedOutputSurface.java
+++ b/src/main/java/org/distorted/library/DistortedOutputSurface.java
@@ -116,6 +116,9 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
+// 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.
 
   int renderChildren(long time, int num, ArrayList<DistortedNode> children)
     {
@@ -124,11 +127,6 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
     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.
-
     for(int i=0; i<num; i++)
       {
       child = children.get(i);
@@ -137,13 +135,11 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
 
       if( lastB!=currB && lastB!=0 )
         {
-        //android.util.Log.e("output", "i="+i+" postprocess and merge");
         numRenders += lastP.postprocess(time,this);
         }
 
       if( currB==0 )
         {
-        //android.util.Log.e("output", "i="+i+" draw to this");
         numRenders += child.draw(time,this);
         }
       else
@@ -154,11 +150,9 @@ abstract class DistortedOutputSurface extends DistortedSurface implements Distor
           mBuffer2 = new DistortedFramebuffer(false                     , DistortedSurface.TYPE_TREE, mWidth, mHeight);
           }
 
-        //android.util.Log.e("output", "i="+i+" draw to buffer");
         numRenders += child.draw(time,mBuffer1);
         if( i==num-1 )
           {
-          //android.util.Log.e("output", "i="+i+" postprocess and merge");
           numRenders += currP.postprocess(time,this);
           }
         }
diff --git a/src/main/java/org/distorted/library/EffectQueuePostprocess.java b/src/main/java/org/distorted/library/EffectQueuePostprocess.java
index 87aca72..1470c8b 100644
--- a/src/main/java/org/distorted/library/EffectQueuePostprocess.java
+++ b/src/main/java/org/distorted/library/EffectQueuePostprocess.java
@@ -174,7 +174,7 @@ class EffectQueuePostprocess extends EffectQueue
     if( currTime==mTime ) return false;
     if( mTime==0 ) mTime = currTime;
     long step = (currTime-mTime);
-   
+
     for(int i=0; i<mNumEffects; i++)
       {
       mCurrentDuration[i] += step;
@@ -197,7 +197,7 @@ class EffectQueuePostprocess extends EffectQueue
         else mInter[0][i] = null;
         }
       }
-     
+
     mTime = currTime;
 
     return true;
@@ -264,8 +264,10 @@ class EffectQueuePostprocess extends EffectQueue
 
   int postprocess(long time, DistortedOutputSurface surface)
     {
-    if( mNumEffects>0 && compute(time) )
+    if( mNumEffects>0 )
       {
+      compute(time);
+
       surface.mBuffer1.setAsInput();
       float w = surface.mWidth;
       float h = surface.mHeight;
