Project

General

Profile

« Previous | Next » 

Revision 42bc5a3d

Added by Leszek Koltunski almost 2 years ago

simplify the crash app.

View differences:

src/main/java/org/distorted/examples/flatblur2/FlatBlur2Renderer.java
50 50

  
51 51
    private final GLSurfaceView mView;
52 52
    private final DistortedScreen mScreen;
53

  
54 53
    private DistortedNode mNode1, mNode2;
55
    private long mGlowID;
56 54

  
57 55
///////////////////////////////////////////////////////////////////////////////////////////////////
58 56

  
......
126 124

  
127 125
      PostprocessEffectGlow glow = new PostprocessEffectGlow(haloRadius,color);
128 126
      glow.setQuality(EffectQuality.MEDIUM);
129
      mGlowID = glow.getID();
130 127
      glow.notifyWhenFinished(this);
131 128
      DistortedEffects effects = mNode1.getEffects();
132 129
      effects.apply(glow);
......
136 133

  
137 134
   public void effectFinished(long id)
138 135
      {
139
      if( id==mGlowID )
140
         {
141
         mScreen.detach(mNode1);
142
         mNode1.markForDeletion();
143
         mNode1=null;
144
         mScreen.detach(mNode2);
145
         mNode2.markForDeletion();
146
         mNode2=null;
147
         }
136
      mScreen.detach(mNode1);
137
      mNode1.markForDeletion();
138
      mNode1=null;
139
      mScreen.detach(mNode2);
140
      mNode2.markForDeletion();
141
      mNode2=null;
148 142
      }
149 143
}

Also available in: Unified diff