Home | History | Annotate | Download | only in tilebenchmark
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.test.tilebenchmark;
     18 
     19 import java.io.Serializable;
     20 import java.util.HashMap;
     21 
     22 public class RunData implements Serializable {
     23     public TileData[][] frames;
     24     public HashMap<String, Double> singleStats = new HashMap<String, Double>();
     25 
     26     public RunData(int frames) {
     27         this.frames = new TileData[frames][];
     28     }
     29 
     30     public class TileData implements Serializable {
     31         public int left, top, right, bottom;
     32         public boolean isReady;
     33         public int level;
     34         public float scale;
     35 
     36         public TileData(int left, int top, int right, int bottom,
     37                 boolean isReady, int level, float scale) {
     38             this.left = left;
     39             this.right = right;
     40             this.top = top;
     41             this.bottom = bottom;
     42             this.isReady = isReady;
     43             this.level = level;
     44             this.scale = scale;
     45         }
     46 
     47         public String toString() {
     48             return "Tile (" + left + "," + top + ")->("
     49                     + right + "," + bottom + ")"
     50                     + (isReady ? "ready" : "NOTready") + " at scale " + scale;
     51         }
     52     }
     53 
     54 }
     55