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.android.ide.eclipse.gltrace.model; 18 19 /** 20 * A GLFrame is used to keep track of the start and end {@link GLCall} indices 21 * for each OpenGL frame. 22 */ 23 public class GLFrame { 24 private final int mIndex; 25 private final int mStartCallIndex; 26 private final int mEndCallIndex; 27 28 /** 29 * Construct a {@link GLFrame} given the range of {@link GLCall}s spanning this frame. 30 * @param frameIndex index of this frame in the trace. 31 * @param startCallIndex index of the first call in this frame (inclusive). 32 * @param endCallIndex index of the last call in this frame (exclusive). 33 */ GLFrame(int frameIndex, int startCallIndex, int endCallIndex)34 public GLFrame(int frameIndex, int startCallIndex, int endCallIndex) { 35 mIndex = frameIndex; 36 mStartCallIndex = startCallIndex; 37 mEndCallIndex = endCallIndex; 38 } 39 getIndex()40 public int getIndex() { 41 return mIndex; 42 } 43 getStartIndex()44 public int getStartIndex() { 45 return mStartCallIndex; 46 } 47 getEndIndex()48 public int getEndIndex() { 49 return mEndCallIndex; 50 } 51 } 52