예제 #1
0
    public static TouchHistory obtain(float x, float y, float pressure) {
      TouchHistory data = sPool.acquire();
      if (data == null) {
        data = new TouchHistory();
      }

      data.setTouch(x, y, pressure);

      return data;
    }
예제 #2
0
 public void recycle() {
   this.historyIndex = 0;
   this.historyCount = 0;
   sPool.release(this);
 }