Project

General

Profile

« Previous | Next » 

Revision cc2979e3

Added by Leszek Koltunski almost 8 years ago

Minor

View differences:

src/main/java/org/distorted/library/DistortedSurface.java
58 58

  
59 59
  private static boolean mToDo = false;
60 60
  private static LinkedList<DistortedSurface> mDoneList = new LinkedList<>();
61
  private static HashMap<Long,Job> mToDoList = new HashMap<>();
61
  private static HashMap<Long,Job> mToDoMap = new HashMap<>();
62 62
  private static long mNextClientID = 0;
63 63
  private static long mNextSystemID = 0;
64 64

  
......
84 84
      Job job;
85 85
      DistortedSurface surface;
86 86

  
87
      for(Long key: mToDoList.keySet())
87
      for(Long key: mToDoMap.keySet())
88 88
        {
89
        job = mToDoList.get(key);
89
        job = mToDoMap.get(key);
90 90
        surface = job.surface;
91 91

  
92 92
        android.util.Log.d("SURFACE", "  ---> need to "+(job.action==JOB_CREATE ? "create":"delete")+" surfaceID="+surface.getID() );
......
102 102
          }
103 103
        }
104 104

  
105
      mToDoList.clear();
105
      mToDoMap.clear();
106 106
      mToDo = false;
107 107
      }
108 108
    }
......
114 114
    Job job;
115 115
    DistortedSurface surface;
116 116

  
117
    for(Long key: mToDoList.keySet())
117
    for(Long key: mToDoMap.keySet())
118 118
      {
119
      job = mToDoList.get(key);
119
      job = mToDoMap.get(key);
120 120

  
121 121
      if( job.surface.mType==TYPE_SYST )
122 122
        {
......
124 124
        }
125 125
      }
126 126

  
127
    mToDoList.clear();
127
    mToDoMap.clear();
128 128

  
129 129
    int num = mDoneList.size();
130 130

  
......
134 134

  
135 135
      if( surface.mType==TYPE_SYST )
136 136
        {
137
        mToDoList.put(surface.getID(), surface.new Job(surface,JOB_CREATE) );
137
        mToDoMap.put(surface.getID(), surface.new Job(surface,JOB_CREATE) );
138 138
        surface.recreate();
139 139
        }
140 140
      }
......
164 164
    Job job;
165 165
    int i=0;
166 166

  
167
    for(Long key: mToDoList.keySet())
167
    for(Long key: mToDoMap.keySet())
168 168
      {
169
      job = mToDoList.get(key);
169
      job = mToDoMap.get(key);
170 170
      job.surface.print(i++, job.action==JOB_CREATE ? " create":" delete");
171 171
      }
172 172
    }
......
208 208

  
209 209
    if( create!=DONT_CREATE )
210 210
      {
211
      mToDoList.put(mID, new Job(this,JOB_CREATE) );
211
      mToDoMap.put(mID, new Job(this,JOB_CREATE) );
212 212
      mToDo = true;
213 213
      }
214 214
    }
......
218 218
  synchronized void markForCreation()
219 219
    {
220 220
    mDoneList.remove(this);
221
    mToDoList.put(mID, new Job(this,JOB_CREATE) );
221
    mToDoMap.put(mID, new Job(this,JOB_CREATE) );
222 222
    mToDo = true;
223 223
    }
224 224

  
......
231 231
  synchronized public void markForDeletion()
232 232
    {
233 233
    mDoneList.remove(this);
234
    mToDoList.put(mID, new Job(this,JOB_DELETE) );
234
    mToDoMap.put(mID, new Job(this,JOB_DELETE) );
235 235
    mToDo = true;
236 236
    }
237 237

  

Also available in: Unified diff