Revision df5f8dd9
Added by Leszek Koltunski over 6 years ago
src/main/java/org/distorted/library/main/DistortedOutputSurface.java | ||
---|---|---|
71 | 71 |
private ArrayList<Job> mJobs = new ArrayList<>(); |
72 | 72 |
|
73 | 73 |
// Global buffers used for postprocessing. |
74 |
private static DistortedOutputSurface[] mBuffer = new DistortedOutputSurface[EffectQuality.LENGTH];
|
|
74 |
private static DistortedOutputSurface[] mBuffer=null;
|
|
75 | 75 |
|
76 | 76 |
private float mFOV; |
77 | 77 |
float mDistance, mNear; |
... | ... | |
178 | 178 |
|
179 | 179 |
private static void createPostprocessingBuffers(int width, int height, float near) |
180 | 180 |
{ |
181 |
mBuffer = new DistortedOutputSurface[EffectQuality.LENGTH]; |
|
181 | 182 |
float mipmap=1.0f; |
182 | 183 |
|
183 | 184 |
for (int j=0; j<EffectQuality.LENGTH; j++) |
... | ... | |
218 | 219 |
|
219 | 220 |
static synchronized void onDestroy() |
220 | 221 |
{ |
221 |
for(int j=0; j<EffectQuality.LENGTH; j++)
|
|
222 |
if( mBuffer!=null )
|
|
222 | 223 |
{ |
223 |
mBuffer[j] = null; |
|
224 |
for (int j = 0; j < EffectQuality.LENGTH; j++) |
|
225 |
{ |
|
226 |
mBuffer[j] = null; |
|
227 |
} |
|
228 |
|
|
229 |
mBuffer = null; |
|
224 | 230 |
} |
225 | 231 |
} |
226 | 232 |
|
... | ... | |
402 | 408 |
} |
403 | 409 |
else |
404 | 410 |
{ |
405 |
if( mBuffer[0]==null ) createPostprocessingBuffers(mWidth,mHeight,mNear);
|
|
411 |
if( mBuffer==null ) createPostprocessingBuffers(mWidth,mHeight,mNear); |
|
406 | 412 |
|
407 | 413 |
if( lastBucket!=currBucket ) |
408 | 414 |
{ |
Also available in: Unified diff
Correct a recently introduced bug.