i[Title] Fix chart axis format
authorkamuru <kamuru@kamuru-Samsung-Desktop-System.(none)>
Mon, 4 Nov 2013 06:50:01 +0000 (15:50 +0900)
committerkamuru <kamuru@kamuru-Samsung-Desktop-System.(none)>
Mon, 4 Nov 2013 06:50:01 +0000 (15:50 +0900)
[Desc.]
[Issue]

org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DAChartRenderer.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataMaker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/context/GLContextTreeTable.java

index 279f315..28dd61f 100644 (file)
@@ -234,16 +234,16 @@ public class DAChartRenderer {
                        if(min == 0) {
                                text = "";
                        } else {
-                               text = "(" + Formatter.toByteFormatConvertDecimalPrefix(1000 / (min)) + "fps)";
+                               text = "(" + Formatter.toByteFormatConvertDecimalPrefix(1000 / min) + "fps)";
                        }
-                       text += Formatter.toByteFormatConvertDecimalPrefix(min);
+                       text += min;
                } else if (plot.getAxisUnitType() == DAChartPlot.UnitType.GL_FPS) {
                        if (min == 0) {
                                text = "";
                        } else {
-                               text = "(" + Formatter.toByteFormatConvertDecimalPrefix((1000 / min)) + "ms)";
+                               text = "(" + Formatter.toByteFormatConvertDecimalPrefix(1000 / min) + "ms)";
                        }
-                       text += Formatter.toByteFormatConvertDecimalPrefix(min);
+                       text += min;
                }
                
                if (null != axisUnit) {
@@ -269,14 +269,14 @@ public class DAChartRenderer {
                        } else {
                                text = "(" + Formatter.toByteFormatConvertDecimalPrefix(2000 / (min + max)) + "fps)";
                        }
-                       text += Formatter.toByteFormatConvertDecimalPrefix((min + max) / 2);
+                       text += (min + max) / 2;
                } else if (plot.getAxisUnitType() == DAChartPlot.UnitType.GL_FPS) {
                        if (max == 0) {
                                text = "";
                        } else {
                                text = "(" + Formatter.toByteFormatConvertDecimalPrefix(2000 / (min + max)) + "ms)";
                        }
-                       text += Formatter.toByteFormatConvertDecimalPrefix((min + max) / 2);
+                       text += (min + max) / 2;
                }
                if (null != axisUnit) {
                        text += axisUnit;
@@ -297,16 +297,16 @@ public class DAChartRenderer {
                        if(max == 0) {
                                text = "";
                        } else {
-                               text = "(" + Formatter.toByteFormatConvertDecimalPrefix(1000 / (max)) + "fps)";
+                               text = "(" + Formatter.toByteFormatConvertDecimalPrefix(1000 / max) + "fps)";
                        }
-                       text += Formatter.toByteFormatConvertDecimalPrefix((max));
+                       text += max;
                } else if (plot.getAxisUnitType() == DAChartPlot.UnitType.GL_FPS) {
                        if(max == 0) {
                                text = "";
                        } else {
                                text = "(" + Formatter.toByteFormatConvertDecimalPrefix((1000 / max)) + "ms)";
                        }
-                       text += Formatter.toByteFormatConvertDecimalPrefix(max);
+                       text += max;
                }
                if (null != axisUnit) {
                        text += axisUnit;
index aec51ae..3d4ba9b 100644 (file)
@@ -139,7 +139,8 @@ public class GLDataMaker {
        private static final String API_GL_VERTEX_ATTRIB_POINTER = "glVertexAttribPointer";
        private static final String API_GL_VIEWPORT = "glViewport";
        
-       private static final String API_EGL_SWAPBUFFERS = "_SglSwapBuffers";
+       private static final String API_EGL_SWAPBUFFERS = "eglSwapBuffers";
+       private static final String API_SGL_SWAPBUFFERS = "_SglSwapBuffers";
        
        private static GLDataMaker instance = null;
        private static final int CONTEXT_VALUE_SIZE = GLContextDBEnum.values().length;
@@ -408,19 +409,15 @@ public class GLDataMaker {
                String seq = String.valueOf(logData.getSeq());
                String apiName = logData.getApiName();
                String parameter = logData.getArgs();
-               System.out.println(apiName + " " + parameter);
                long errorNo = logData.getErrno();
                
                //FIXME
-               if(apiName.equals(API_EGL_SWAPBUFFERS)) {
+               if(apiName.equals(API_SGL_SWAPBUFFERS)) {
                        errorNo = 0;
                        logData.setErrNo(0);
+                       logData.setApiName(API_EGL_SWAPBUFFERS);
                }
                
-               if(errorNo != 0) {
-                       System.out.println("00");
-               }
-
                if (apiType != API_TYPE_INIT) {
                        glFrameDataList.get(currentFrameIndex).addGLAPIData(
                                        new GLAPIData(logData));
@@ -473,7 +470,7 @@ public class GLDataMaker {
                        String parameters[] = parameter.split(COMMA + SPACE);
                        String contextValues[] = logData.getContextValue().split(COMMA);
 
-                       if (apiName.equals(API_EGL_SWAPBUFFERS)) {
+                       if (apiName.equals(API_SGL_SWAPBUFFERS)) {
                                GLFrameData currentFrameData = glFrameDataList.get(currentFrameIndex);
                                int frameNumber = currentFrameData.getFrameNumber();
 
@@ -481,8 +478,10 @@ public class GLDataMaker {
                                                currentFrameData.getFrametime(),
                                                currentFrameData.hasError());
 
-                               GLFrameTimeChart.getInstance().addData(frameNumber,
-                                               currentFrameData.getFrametime(),
+                               GLFrameTimeChart.getInstance().addData(
+                                               frameNumber,
+                                               currentFrameData.getFrametime()
+                                                               / TimelineConstants.KILO_LONG,
                                                currentFrameData.hasError());
 
                                int time = (int) (logData.getTime() / TimelineConstants.MEGA_LONG);
index 545b4a8..102a539 100644 (file)
@@ -297,7 +297,6 @@ public class GLContextTreeTable extends DATreeComposite {
 
        private void createNaviButtons(GridItem gridItem,
                        GLContextTreeNodeData treeNodeData) {
-               System.out.println("create navi button");
                
                Color bgColor;
                if (table.isSelected(gridItem)) {