commit ffbe7ecf040b9bdd5931fcc7d890109824e3fbd3
Author: Leszek Koltunski <leszek@distoretedandroid.org>
Date:   Wed Jun 14 17:09:50 2017 +0100

    Remove old facility to correct Postprocessing buckets on new Postporcessing effects.
    
    New facility will follow shortly....

diff --git a/src/main/java/org/distorted/library/main/DistortedNode.java b/src/main/java/org/distorted/library/main/DistortedNode.java
index 5a11a99..aa656eb 100644
--- a/src/main/java/org/distorted/library/main/DistortedNode.java
+++ b/src/main/java/org/distorted/library/main/DistortedNode.java
@@ -48,13 +48,11 @@ public class DistortedNode implements DistortedSlave
     {
     int type;
     DistortedNode node;
-    DistortedEffectsPostprocess dep;
 
-    Job(int t, DistortedNode n, DistortedEffectsPostprocess d)
+    Job(int t, DistortedNode n)
       {
       type = t;
       node = n;
-      dep  = d;
       }
     }
 
@@ -67,7 +65,6 @@ public class DistortedNode implements DistortedSlave
   private DistortedOutputSurface mSurfaceParent;
   private MeshObject mMesh;
   private DistortedEffects mEffects;
-  private DistortedEffectsPostprocess mPostprocess;
   private DistortedInputSurface mSurface;
   private DistortedRenderState mState;
   private NodeData mData;
@@ -330,20 +327,6 @@ public class DistortedNode implements DistortedSlave
     return numRenders;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void newJob(int t, DistortedNode n, DistortedEffectsPostprocess d)
-    {
-    mJobs.add(new Job(t,n,d));
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  void setPost(DistortedEffectsPostprocess dep)
-    {
-    mPostprocess = dep;
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   void setSurfaceParent(DistortedOutputSurface dep)
@@ -366,7 +349,6 @@ public class DistortedNode implements DistortedSlave
     {
     mSurface       = surface;
     mEffects       = effects;
-    mPostprocess   = null;
     mMesh          = mesh;
     mState         = new DistortedRenderState();
     mChildren      = null;
@@ -409,7 +391,6 @@ public class DistortedNode implements DistortedSlave
   public DistortedNode(DistortedNode node, int flags)
     {
     mEffects      = new DistortedEffects(node.mEffects,flags);
-    mPostprocess  = null;
     mMesh         = node.mMesh;
     mState        = new DistortedRenderState();
     mParent       = null;
@@ -488,7 +469,7 @@ public class DistortedNode implements DistortedSlave
  */
   public void attach(DistortedNode node)
     {
-    mJobs.add(new Job(ATTACH,node,null));
+    mJobs.add(new Job(ATTACH,node));
     DistortedMaster.newSlave(this);
     }
 
@@ -507,7 +488,7 @@ public class DistortedNode implements DistortedSlave
   public DistortedNode attach(DistortedInputSurface surface, DistortedEffects effects, MeshObject mesh)
     {
     DistortedNode node = new DistortedNode(surface,effects,mesh);
-    mJobs.add(new Job(ATTACH,node,null));
+    mJobs.add(new Job(ATTACH,node));
     DistortedMaster.newSlave(this);
     return node;
     }
@@ -523,7 +504,7 @@ public class DistortedNode implements DistortedSlave
  */
   public void detach(DistortedNode node)
     {
-    mJobs.add(new Job(DETACH,node,null));
+    mJobs.add(new Job(DETACH,node));
     DistortedMaster.newSlave(this);
     }
 
@@ -552,7 +533,7 @@ public class DistortedNode implements DistortedSlave
       if( node.getEffects().getID()==id )
         {
         detached = true;
-        mJobs.add(new Job(DETACH,node,null));
+        mJobs.add(new Job(DETACH,node));
         DistortedMaster.newSlave(this);
         break;
         }
@@ -587,7 +568,7 @@ public class DistortedNode implements DistortedSlave
  */
   public void detachAll()
     {
-    mJobs.add(new Job(DETALL,null,null));
+    mJobs.add(new Job(DETALL,null));
     DistortedMaster.newSlave(this);
     }
 
@@ -642,8 +623,7 @@ public class DistortedNode implements DistortedSlave
                        mNumChildren[0] = 0;
                        }
                      break;
-        case SORT  : job.node.mPostprocess = job.dep;
-                     mChildren.remove(job.node);
+        case SORT  : mChildren.remove(job.node);
                      DistortedMaster.addSorted(mChildren,job.node);
                      break;
         }
@@ -651,34 +631,6 @@ public class DistortedNode implements DistortedSlave
 
     if( numChanges>0 ) adjustIsomorphism();
     }
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Sets the Postprocessing Effects we will apply to the temporary buffer this Node - and fellow siblings
- * with the same Effects - will get rendered to.
- * <p>
- * For efficiency reasons, it is very important to assign the very same DistortedEffectsPostprocess
- * object to all the DistortedNode siblings that are supposed to be postprocessed in the same way,
- * because only then will the library assign all such siblings to the same 'Bucket' which gets rendered
- * to the same offscreen buffer which then gets postprocessed in one go and subsequently merged to the
- * target Surface.
- */
-  public void setPostprocessEffects(DistortedEffectsPostprocess dep)
-    {
-    if( mParent!=null )
-      {
-      mParent.newJob(SORT, this, dep);
-      DistortedMaster.newSlave(mParent);
-      }
-    else if( mSurfaceParent!=null )
-      {
-      mSurfaceParent.newJob(SORT, this, dep);
-      DistortedMaster.newSlave(mSurfaceParent);
-      }
-    else
-      {
-      mPostprocess = dep;
-      }
-    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /**
diff --git a/src/main/java/org/distorted/library/main/DistortedOutputSurface.java b/src/main/java/org/distorted/library/main/DistortedOutputSurface.java
index ca2447b..c1b143c 100644
--- a/src/main/java/org/distorted/library/main/DistortedOutputSurface.java
+++ b/src/main/java/org/distorted/library/main/DistortedOutputSurface.java
@@ -60,13 +60,11 @@ public static final int DEBUG_FPS = 1;
     {
     int type;
     DistortedNode node;
-    DistortedEffectsPostprocess dep;
 
-    Job(int t, DistortedNode n, DistortedEffectsPostprocess d)
+    Job(int t, DistortedNode n)
       {
       type = t;
       node = n;
-      dep  = d;
       }
     }
 
@@ -319,9 +317,9 @@ sLast = sCurr;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  void newJob(int t, DistortedNode n, DistortedEffectsPostprocess d)
+  void newJob(int t, DistortedNode n)
     {
-    mJobs.add(new Job(t,n,d));
+    mJobs.add(new Job(t,n));
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -608,7 +606,7 @@ sLast = sCurr;
  */
   public void attach(DistortedNode node)
     {
-    mJobs.add(new Job(ATTACH,node,null));
+    mJobs.add(new Job(ATTACH,node));
     DistortedMaster.newSlave(this);
     }
 
@@ -627,7 +625,7 @@ sLast = sCurr;
   public DistortedNode attach(DistortedInputSurface surface, DistortedEffects effects, MeshObject mesh)
     {
     DistortedNode node = new DistortedNode(surface,effects,mesh);
-    mJobs.add(new Job(ATTACH,node,null));
+    mJobs.add(new Job(ATTACH,node));
     DistortedMaster.newSlave(this);
     return node;
     }
@@ -657,7 +655,7 @@ sLast = sCurr;
       if( node.getEffects().getID()==id )
         {
         detached = true;
-        mJobs.add(new Job(DETACH,node,null));
+        mJobs.add(new Job(DETACH,node));
         DistortedMaster.newSlave(this);
         break;
         }
@@ -694,7 +692,7 @@ sLast = sCurr;
  */
   public void detach(DistortedNode node)
     {
-    mJobs.add(new Job(DETACH,node,null));
+    mJobs.add(new Job(DETACH,node));
     DistortedMaster.newSlave(this);
     }
 
@@ -707,7 +705,7 @@ sLast = sCurr;
  */
   public void detachAll()
     {
-    mJobs.add(new Job(DETALL,null,null));
+    mJobs.add(new Job(DETALL,null));
     DistortedMaster.newSlave(this);
     }
 
@@ -754,8 +752,7 @@ sLast = sCurr;
                        mNumChildren = 0;
                        }
                      break;
-        case SORT  : job.node.setPost(job.dep);
-                     mChildren.remove(job.node);
+        case SORT  : mChildren.remove(job.node);
                      DistortedMaster.addSorted(mChildren,job.node);
                      break;
         }
