From 40a5603eab1966735369c310c7368d9c933d71a2 Mon Sep 17 00:00:00 2001 From: kamuru Date: Tue, 1 Oct 2013 10:40:42 +0900 Subject: [PATCH] [Title] modify gl constants to decimal, fix bug in gl page [Desc.] [Issue] --- .../swap/logparser/SWAPLogParser.java | 4 +- .../swap/model/probe/GLES20LogFormat.java | 4 +- .../swap/model/probe/LogFormat.java | 1 + .../swap/model/probe2/DataFactory.java | 9 +- .../swap/model/probe2/LogDataFactory.java | 3 +- .../ui/common/SetRangeMarkerMouseMoveListener.java | 3 + .../dynamicanalyzer/ui/opengl/GLConstantMap.java | 249 +++++++++++---------- .../ui/opengl/data/GLDataMaker.java | 6 +- .../tizen/dynamicanalyzer/ui/opengl/ui/GLPage.java | 6 +- .../ui/opengl/ui/apiList/GLAPIListTable.java | 18 +- .../ui/opengl/ui/chart/GLFPSChart.java | 2 +- .../ui/opengl/ui/context/GLContextView.java | 8 +- 12 files changed, 161 insertions(+), 152 deletions(-) diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java index 3b4114d..f781350 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java @@ -159,8 +159,8 @@ public class SWAPLogParser implements Runnable { } } - System.out.println("CallerPCAddr : " - + ((ProbeCommonData) log).getCallerPcAddr()); +// System.out.println("CallerPCAddr : " +// + ((ProbeCommonData) log).getCallerPcAddr()); } int seqNum = log.getSeq(); diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe/GLES20LogFormat.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe/GLES20LogFormat.java index 142d13a..9f9c8b9 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe/GLES20LogFormat.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe/GLES20LogFormat.java @@ -4,9 +4,9 @@ import java.util.Arrays; public class GLES20LogFormat extends LogFormat { public static final String NAME = "GLES20"; - + private static volatile GLES20LogFormat instance = null; - + public static GLES20LogFormat getInstance() { if(instance == null) { synchronized (GLES20LogFormat.class) { diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe/LogFormat.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe/LogFormat.java index f0d39d4..c22882b 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe/LogFormat.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe/LogFormat.java @@ -93,6 +93,7 @@ public class LogFormat { logFormats.add(ThreadLogFormat.getInstance()); logFormats.add(UIEventLogFormat.getInstance()); logFormats.add(UserFunctionLogFormat.getInstance()); + logFormats.add(GLES20LogFormat.getInstance()); } return logFormats; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/DataFactory.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/DataFactory.java index 8e5c3da..29fa89f 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/DataFactory.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/DataFactory.java @@ -256,10 +256,11 @@ public class DataFactory { long elapsedTime = ByteUtils.toLong(payload, index); index += LONG_SIZE; - int length = LogDataUtils.getStringLength(index, payload); - byte[] temp = new byte[length]; - System.arraycopy(payload, index, temp, 0, length); - String contextValue = new String(temp); +// int length = LogDataUtils.getStringLength(index, payload); +// byte[] temp = new byte[length]; +// System.arraycopy(payload, index, temp, 0, length); +// String contextValue = new String(temp); + String contextValue = LogDataUtils.getString(index, payload); data.setApiType(apiType); data.setElapsedTime(elapsedTime); diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/LogDataFactory.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/LogDataFactory.java index 4243efd..7adf0c5 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/LogDataFactory.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/LogDataFactory.java @@ -108,7 +108,7 @@ public class LogDataFactory { || id == 8211 || id == 12292 || id == 12290 || id == 12295 || id == 12289 || id == 12291|| id == 8201) { } else { - System.out.println("createInstance id : " + id); +// System.out.println("createInstance id : " + id); } LogData output = null; @@ -293,6 +293,7 @@ public class LogDataFactory { break; case MSG_PROBE_GLES20: format = GLES20LogFormat.getInstance(); + break; case MSG_PROBE_LIFECYCLE: format = LifeCycleLogFormat.getInstance(); break; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/SetRangeMarkerMouseMoveListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/SetRangeMarkerMouseMoveListener.java index 0dc3e6b..4a642a5 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/SetRangeMarkerMouseMoveListener.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/SetRangeMarkerMouseMoveListener.java @@ -25,6 +25,9 @@ public class SetRangeMarkerMouseMoveListener implements MouseMoveListener { public void mouseMove(MouseEvent e) { DATimelineMarker startMarker = timeline.getStartRangeMarker(); DATimelineMarker endMarker = timeline.getEndRangeMarker(); + if (null == startMarker || null == endMarker) { + return; + } if (startMarker.isPushed()) { double startTime = startMarker.getTime(); diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/GLConstantMap.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/GLConstantMap.java index 28f1c3c..d3dd795 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/GLConstantMap.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/GLConstantMap.java @@ -8,159 +8,160 @@ public class GLConstantMap { private static void initialize() { constantMap = new HashMap(); /* DataType */ - constantMap.put("1400", "GL_BYTE"); - constantMap.put("1401", "GL_UNSIGNED_BYTE"); - constantMap.put("1402", "GL_SHORT"); - constantMap.put("1403", "GL_UNSIGNED_SHORT"); - constantMap.put("1404", "GL_INT"); - constantMap.put("1405", "GL_UNSIGNED_INT"); - constantMap.put("1406", "GL_FLOAT"); - constantMap.put("140c", "GL_FIXED"); + constantMap.put("5120", "GL_BYTE"); + constantMap.put("5121", "GL_UNSIGNED_BYTE"); + constantMap.put("5122", "GL_SHORT"); + constantMap.put("5123", "GL_UNSIGNED_SHORT"); + constantMap.put("5124", "GL_INT"); + constantMap.put("5125", "GL_UNSIGNED_INT"); + constantMap.put("5126", "GL_FLOAT"); + constantMap.put("5132", "GL_FIXED"); /* BlendingFactorDest */ constantMap.put("0", "GL_ZERO"); constantMap.put("1", "GL_ONE"); - constantMap.put("300", "GL_SRC_COLOR"); - constantMap.put("301", "GL_ONE_MINUS_SRC_COLOR"); - constantMap.put("302", "GL_SRC_ALPHA"); - constantMap.put("303", "GL_ONE_MINUS_SRC_ALPHA"); - constantMap.put("304", "GL_DST_ALPHA"); - constantMap.put("305", "GL_ONE_MINUS_DST_ALPHA"); + constantMap.put("768", "GL_SRC_COLOR"); + constantMap.put("769", "GL_ONE_MINUS_SRC_COLOR"); + constantMap.put("770", "GL_SRC_ALPHA"); + constantMap.put("771", "GL_ONE_MINUS_SRC_ALPHA"); + constantMap.put("772", "GL_DST_ALPHA"); + constantMap.put("773", "GL_ONE_MINUS_DST_ALPHA"); /* BlendingFactorSrc */ - constantMap.put("306", "GL_DST_COLOR"); - constantMap.put("307", "GL_ONE_MINUS_DST_COLOR"); - constantMap.put("308", "GL_SRC_ALPHA_SATURATE"); + constantMap.put("774", "GL_DST_COLOR"); + constantMap.put("775", "GL_ONE_MINUS_DST_COLOR"); + constantMap.put("776", "GL_SRC_ALPHA_SATURATE"); /* BlendEquationSeparate */ - constantMap.put("8006", "GL_FUNC_ADD"); - constantMap.put("8009", "GL_BLEND_EQUATION"); - constantMap.put("8009", "GL_BLEND_EQUATION_RGB");//FIXME - constantMap.put("883d", "GL_BLEND_EQUATION_ALPHA"); + constantMap.put("32774", "GL_FUNC_ADD"); + constantMap.put("32777", "GL_BLEND_EQUATION"); + constantMap.put("32777", "GL_BLEND_EQUATION_RGB");//FIXME + constantMap.put("34877", "GL_BLEND_EQUATION_ALPHA"); /* BlendSubtract */ - constantMap.put("800a", "GL_FUNC_SUBTRACT"); - constantMap.put("880b", "GL_FUNC_REVERSE_SUBTRACT"); + constantMap.put("32778", "GL_FUNC_SUBTRACT"); + constantMap.put("32779", "GL_FUNC_REVERSE_SUBTRACT"); /* Separate Blend Functions */ - constantMap.put("80c8", "GL_BLEND_DST_RGB"); - constantMap.put("80c9", "GL_BLEND_SRC_RGB"); - constantMap.put("80ca", "GL_BLEND_DST_ALPHA"); - constantMap.put("80cb", "GL_BLEND_SRC_ALPHA"); - constantMap.put("8001", "GL_CONSTANT_COLOR"); - constantMap.put("8002", "GL_ONE_MINUS_CONSTANT_COLOR"); - constantMap.put("8003", "GL_CONSTANT_ALPHA"); - constantMap.put("8004", "GL_ONE_MINUS_CONSTANT_ALPHA"); - constantMap.put("8005", "GL_BLEND_COLOR"); + constantMap.put("32968", "GL_BLEND_DST_RGB"); + constantMap.put("32969", "GL_BLEND_SRC_RGB"); + constantMap.put("32970", "GL_BLEND_DST_ALPHA"); + constantMap.put("32971", "GL_BLEND_SRC_ALPHA"); + constantMap.put("32769", "GL_CONSTANT_COLOR"); + constantMap.put("32770", "GL_ONE_MINUS_CONSTANT_COLOR"); + constantMap.put("32771", "GL_CONSTANT_ALPHA"); + constantMap.put("32772", "GL_ONE_MINUS_CONSTANT_ALPHA"); + constantMap.put("32773", "GL_BLEND_COLOR"); /* FrontFaceDirection */ - constantMap.put("900", "GL_CW"); - constantMap.put("901", "GL_CCW"); + constantMap.put("2304", "GL_CW"); + constantMap.put("2305", "GL_CCW"); /* CullFaceMode */ - constantMap.put("404", "GL_FRONT"); - constantMap.put("405", "GL_BACK"); - constantMap.put("408", "GL_FRONT_AND_BACK"); + constantMap.put("1028", "GL_FRONT"); + constantMap.put("1029", "GL_BACK"); + constantMap.put("1030", "GL_FRONT_AND_BACK"); /* StencilFunction */ - constantMap.put("200", "GL_NEVER"); - constantMap.put("201", "GL_LESS"); - constantMap.put("202", "GL_EQUAL"); - constantMap.put("203", "GL_LEQUAL"); - constantMap.put("204", "GL_GREATER"); - constantMap.put("205", "GL_NOTEQUAL"); - constantMap.put("206", "GL_GEQUAL"); - constantMap.put("207", "GL_ALWAYS"); + constantMap.put("512", "GL_NEVER"); + constantMap.put("513", "GL_LESS"); + constantMap.put("514", "GL_EQUAL"); + constantMap.put("515", "GL_LEQUAL"); + constantMap.put("516", "GL_GREATER"); + constantMap.put("517", "GL_NOTEQUAL"); + constantMap.put("518", "GL_GEQUAL"); + constantMap.put("519", "GL_ALWAYS"); /* StencilOp */ - constantMap.put("1e00", "GL_KEEP"); - constantMap.put("1e01", "GL_REPLACE"); - constantMap.put("1e02", "GL_INCR"); - constantMap.put("1e03", "GL_DECR"); - constantMap.put("1e0a", "GL_INVERT"); - constantMap.put("1e07", "GL_INCR_WRAP"); - constantMap.put("1e08", "GL_DECR_WRAP"); + constantMap.put("7680", "GL_KEEP"); + constantMap.put("7681", "GL_REPLACE"); + constantMap.put("7682", "GL_INCR"); + constantMap.put("7683", "GL_DECR"); + constantMap.put("7690", "GL_INVERT"); + constantMap.put("7687", "GL_INCR_WRAP"); + constantMap.put("7688", "GL_DECR_WRAP"); /* TextureUnit */ - constantMap.put("84c0", "GL_TEXTURE0"); - constantMap.put("84c1", "GL_TEXTURE1"); - constantMap.put("84c2", "GL_TEXTURE2"); - constantMap.put("84c3", "GL_TEXTURE3"); - constantMap.put("84c4", "GL_TEXTURE4"); - constantMap.put("84c5", "GL_TEXTURE5"); - constantMap.put("84c6", "GL_TEXTURE6"); - constantMap.put("84c7", "GL_TEXTURE7"); - constantMap.put("84c8", "GL_TEXTURE8"); - constantMap.put("84c9", "GL_TEXTURE9"); - constantMap.put("84ca", "GL_TEXTURE10"); - constantMap.put("84cb", "GL_TEXTURE11"); - constantMap.put("84cc", "GL_TEXTURE12"); - constantMap.put("84cd", "GL_TEXTURE13"); - constantMap.put("84ce", "GL_TEXTURE14"); - constantMap.put("84cf", "GL_TEXTURE15"); - constantMap.put("84d0", "GL_TEXTURE16"); - constantMap.put("84d1", "GL_TEXTURE17"); - constantMap.put("84d2", "GL_TEXTURE18"); - constantMap.put("84d3", "GL_TEXTURE19"); - constantMap.put("84d4", "GL_TEXTURE20"); - constantMap.put("84d5", "GL_TEXTURE21"); - constantMap.put("84d6", "GL_TEXTURE22"); - constantMap.put("84d7", "GL_TEXTURE23"); - constantMap.put("84d8", "GL_TEXTURE24"); - constantMap.put("84d9", "GL_TEXTURE25"); - constantMap.put("84da", "GL_TEXTURE26"); - constantMap.put("84db", "GL_TEXTURE27"); - constantMap.put("84dc", "GL_TEXTURE28"); - constantMap.put("84dd", "GL_TEXTURE29"); - constantMap.put("84de", "GL_TEXTURE30"); - constantMap.put("84df", "GL_TEXTURE31"); - constantMap.put("84e0", "GL_ACTIVE_TEXTURE"); + constantMap.put("33984", "GL_TEXTURE0"); + constantMap.put("33985", "GL_TEXTURE1"); + constantMap.put("33986", "GL_TEXTURE2"); + constantMap.put("33987", "GL_TEXTURE3"); + constantMap.put("33988", "GL_TEXTURE4"); + constantMap.put("33989", "GL_TEXTURE5"); + constantMap.put("33990", "GL_TEXTURE6"); + constantMap.put("33991", "GL_TEXTURE7"); + constantMap.put("33992", "GL_TEXTURE8"); + constantMap.put("33993", "GL_TEXTURE9"); + constantMap.put("33994", "GL_TEXTURE10"); + constantMap.put("33995", "GL_TEXTURE11"); + constantMap.put("33996", "GL_TEXTURE12"); + constantMap.put("33997", "GL_TEXTURE13"); + constantMap.put("33998", "GL_TEXTURE14"); + constantMap.put("33999", "GL_TEXTURE15"); + constantMap.put("34000", "GL_TEXTURE16"); + constantMap.put("34001", "GL_TEXTURE17"); + constantMap.put("34002", "GL_TEXTURE18"); + constantMap.put("34003", "GL_TEXTURE19"); + constantMap.put("34004", "GL_TEXTURE20"); + constantMap.put("34005", "GL_TEXTURE21"); + constantMap.put("34006", "GL_TEXTURE22"); + constantMap.put("34007", "GL_TEXTURE23"); + constantMap.put("34008", "GL_TEXTURE24"); + constantMap.put("34009", "GL_TEXTURE25"); + constantMap.put("34010", "GL_TEXTURE26"); + constantMap.put("34011", "GL_TEXTURE27"); + constantMap.put("34012", "GL_TEXTURE28"); + constantMap.put("34013", "GL_TEXTURE29"); + constantMap.put("34014", "GL_TEXTURE30"); + constantMap.put("34015", "GL_TEXTURE31"); + constantMap.put("34016", "GL_ACTIVE_TEXTURE"); /* Shaders */ - constantMap.put("8b30", "GL_FRAGMENT_SHADER"); - constantMap.put("8b31", "GL_VERTEX_SHADER"); + constantMap.put("35632", "GL_FRAGMENT_SHADER"); + constantMap.put("35633", "GL_VERTEX_SHADER"); /* Uniform Types */ - constantMap.put("8b50", "GL_FLOAT_VEC2"); - constantMap.put("8b51", "GL_FLOAT_VEC3"); - constantMap.put("8b52", "GL_FLOAT_VEC4"); - constantMap.put("8b53", "GL_INT_VEC2"); - constantMap.put("8b54", "GL_INT_VEC3"); - constantMap.put("8b55", "GL_INT_VEC4"); - constantMap.put("8b56", "GL_BOOL"); - constantMap.put("8b57", "GL_BOOL_VEC2"); - constantMap.put("8b58", "GL_BOOL_VEC3"); - constantMap.put("8b59", "GL_BOOL_VEC4"); - constantMap.put("8b5a", "GL_FLOAT_MAT2"); - constantMap.put("8b5b", "GL_FLOAT_MAT3"); - constantMap.put("8b5c", "GL_FLOAT_MAT4"); - constantMap.put("8b5e", "GL_SAMPLER_2D"); - constantMap.put("8b60", "GL_SAMPLER_CUBE"); + constantMap.put("35664", "GL_FLOAT_VEC2"); + constantMap.put("35665", "GL_FLOAT_VEC3"); + constantMap.put("35666", "GL_FLOAT_VEC4"); + constantMap.put("35667", "GL_INT_VEC2"); + constantMap.put("35668", "GL_INT_VEC3"); + constantMap.put("35669", "GL_INT_VEC4"); + constantMap.put("35670", "GL_BOOL"); + constantMap.put("35671", "GL_BOOL_VEC2"); + constantMap.put("35672", "GL_BOOL_VEC3"); + constantMap.put("35673", "GL_BOOL_VEC4"); + constantMap.put("35674", "GL_FLOAT_MAT2"); + constantMap.put("35675", "GL_FLOAT_MAT3"); + constantMap.put("35676", "GL_FLOAT_MAT4"); + constantMap.put("35678", "GL_SAMPLER_2D"); + constantMap.put("35680", "GL_SAMPLER_CUBE"); /* TextureParameterName */ - constantMap.put("2800", "GL_TEXTURE_MAG_FILTER"); - constantMap.put("2801", "GL_TEXTURE_MIN_FILTER"); - constantMap.put("2802", "GL_TEXTURE_WRAP_S"); - constantMap.put("2803", "GL_TEXTURE_WRAP_T"); + constantMap.put("10240", "GL_TEXTURE_MAG_FILTER"); + constantMap.put("10241", "GL_TEXTURE_MIN_FILTER"); + constantMap.put("10242", "GL_TEXTURE_WRAP_S"); + constantMap.put("10243", "GL_TEXTURE_WRAP_T"); /* TextureTarget */ - constantMap.put("de1", "GL_TEXTURE_2D"); - constantMap.put("8513", "GL_TEXTURE_CUBE_MAP"); + constantMap.put("3553", "GL_TEXTURE_2D"); + constantMap.put("34067", "GL_TEXTURE_CUBE_MAP"); /* TextureMagFilter */ - constantMap.put("2600", "GL_NEAREST"); - constantMap.put("2601", "GL_LINEAR"); + constantMap.put("9728", "GL_NEAREST"); + constantMap.put("9729", "GL_LINEAR"); /* TextureMinFilter */ /* GL_NEAREST */ /* GL_LINEAR */ - constantMap.put("2700", "GL_NEAREST_MIPMAP_NEAREST"); - constantMap.put("2701", "GL_LINEAR_MIPMAP_NEAREST"); - constantMap.put("2702", "GL_NEAREST_MIPMAP_LINEAR"); - constantMap.put("2703", "GL_LINEAR_MIPMAP_LINEAR"); + constantMap.put("9984", "GL_NEAREST_MIPMAP_NEAREST"); + constantMap.put("9985", "GL_LINEAR_MIPMAP_NEAREST"); + constantMap.put("9986", "GL_NEAREST_MIPMAP_LINEAR"); + constantMap.put("9987", "GL_LINEAR_MIPMAP_LINEAR"); /* TextureWrapMode */ - constantMap.put("2901", "GL_REPEAT"); - constantMap.put("812f", "GL_CLAMP_TO_EDGE"); - constantMap.put("8370", "GL_MIRRORED_REPEAT"); + constantMap.put("10497", "GL_REPEAT"); + constantMap.put("33071", "GL_CLAMP_TO_EDGE"); + constantMap.put("33648", "GL_MIRRORED_REPEAT"); /* Buffer Objects */ - constantMap.put("8892", "GL_ARRAY_BUFFER"); - constantMap.put("8893", "GL_ELEMENT_ARRAY_BUFFER"); - constantMap.put("8894", "GL_ARRAY_BUFFER_BINDING"); - constantMap.put("8895", "GL_ELEMENT_ARRAY_BUFFER_BINDING"); + constantMap.put("34962", "GL_ARRAY_BUFFER"); + constantMap.put("34963", "GL_ELEMENT_ARRAY_BUFFER"); + constantMap.put("34964", "GL_ARRAY_BUFFER_BINDING"); + constantMap.put("34965", "GL_ELEMENT_ARRAY_BUFFER_BINDING"); - constantMap.put("88e0", "GL_STREAM_DRAW"); - constantMap.put("88e4", "GL_STATIC_DRAW"); - constantMap.put("88e8", "GL_DYNAMIC_DRAW"); + constantMap.put("35040", "GL_STREAM_DRAW"); + constantMap.put("35044", "GL_STATIC_DRAW"); + constantMap.put("35048", "GL_DYNAMIC_DRAW"); } public static String getConstantString(String key) { if (constantMap == null) { initialize(); } + return constantMap.get(key); } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataMaker.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataMaker.java index 7d44a48..afceebf 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataMaker.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataMaker.java @@ -391,9 +391,9 @@ public class GLDataMaker { } if(apiType == API_TYPE_INIT) { - String parameters[] = parameter.split(COMMA); - int maxVertexAttribs = Integer.parseInt(parameters[0]); - int maxTextureUnits = Integer.parseInt(parameters[1]); + String contextValues[] = logData.getContextValue().split(COMMA); + int maxVertexAttribs = Integer.parseInt(contextValues[0]); + int maxTextureUnits = Integer.parseInt(contextValues[1].trim()); /* GVA */ for(int i = 0; i < maxVertexAttribs; i++) { diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/GLPage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/GLPage.java index 2959ce5..14a5e3e 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/GLPage.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/GLPage.java @@ -32,7 +32,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; +import org.tizen.dynamicanalyzer.common.AnalyzerConstants; import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; import org.tizen.dynamicanalyzer.shortcut.ShortCutManager; import org.tizen.dynamicanalyzer.swap.logparser.LogPackage; @@ -119,9 +119,7 @@ public class GLPage extends DAPageComposite { @Override public void updateLog(LogPackage logPack) { - super.updateLog(logPack); - - Logs glesLogs = logPack.getLogs(LogCenterConstants.LOG_GLES20); + Logs glesLogs = logPack.getLogs(AnalyzerConstants.MSG_PROBE_GLES20); if (glesLogs == null || glesLogs.getLogs().size() == 0) { return; } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/apiList/GLAPIListTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/apiList/GLAPIListTable.java index 56a8983..c7cac0e 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/apiList/GLAPIListTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/apiList/GLAPIListTable.java @@ -55,6 +55,7 @@ import org.tizen.dynamicanalyzer.resources.ImageResources; import org.tizen.dynamicanalyzer.sql.DBTableInfo; import org.tizen.dynamicanalyzer.sql.DBTableManager; import org.tizen.dynamicanalyzer.sql.SqlManager; +import org.tizen.dynamicanalyzer.swap.model.probe2.LogData; import org.tizen.dynamicanalyzer.ui.opengl.GLES20ErrorInformation; import org.tizen.dynamicanalyzer.ui.opengl.data.GLContextDBEnum; import org.tizen.dynamicanalyzer.ui.opengl.data.GLDataMaker; @@ -98,8 +99,8 @@ public class GLAPIListTable extends DAApiListTableComposite { setTableName(GLPageLabels.GL_API_LIST_VIEW_TITLE); setSortTypes(sortTypes); setSourceColumns(sourceColumns); -// setFailedAPIColor(true); -// setColumnAlignment(columnAlignment); + setFailedAPIColor(true); + setColumnAlignment(columnAlignment); setColumns(columnNames); setColumnSize(columnSizes); @@ -115,8 +116,7 @@ public class GLAPIListTable extends DAApiListTableComposite { DATableDataFormat dataFormat = (DATableDataFormat) items[0] .getData(); - long time = Long.parseLong(dataFormat.getData().get( - LogCenterConstants.TIME_INDEX)); + long time = dataFormat.getLogData().getTime(); GLSelectionData selData = new GLSelectionData(GLAPIListView.ID, time, time, items, table, frameIndex); @@ -213,6 +213,8 @@ public class GLAPIListTable extends DAApiListTableComposite { texts.add(glAPIData.getParameter()); texts.add(String.valueOf(glAPIData.getElapsedTime())); texts.add(GLES20ErrorInformation.getError(glAPIData.getErrorNo())); + + tableData.getData().addAll(texts); TableInput tableInput = new TableInput(); tableInput.setText(texts); @@ -295,8 +297,8 @@ public class GLAPIListTable extends DAApiListTableComposite { for (int i = 0; i < selections.length; i++) { DATableDataFormat tableData = (DATableDataFormat) selections[i] .getData(); - List data = tableData.getData(); - selSeqs.add(data.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); + LogData logData = tableData.getLogData(); + selSeqs.add(Integer.toString(logData.getSeq())); } table.removeAll(); @@ -321,6 +323,10 @@ public class GLAPIListTable extends DAApiListTableComposite { List images = input.get(i).getImages(); int columnCount = text.size(); for (int index = 0; index < columnCount; index++) { + if(text.get(index) == null) { + continue; + } + gridItem.setText(index, text.get(index)); if (null != images && !images.isEmpty()) { diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/chart/GLFPSChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/chart/GLFPSChart.java index adfaf34..60f9507 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/chart/GLFPSChart.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/chart/GLFPSChart.java @@ -55,7 +55,7 @@ public class GLFPSChart extends TimelineChart { public void addData(final int frameNumber, long elapsedTime, boolean drawError) { - double fps = Math.round(1000 / (double) elapsedTime); + double fps = Math.round(1000.0 / elapsedTime); if (drawError) { fpsSeries .addSeriesItem(new DAChartSeriesItem( diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/context/GLContextView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/context/GLContextView.java index c1cc588..a03df14 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/context/GLContextView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/context/GLContextView.java @@ -1,7 +1,5 @@ package org.tizen.dynamicanalyzer.ui.opengl.ui.context; -import java.util.List; - import org.eclipse.nebula.widgets.grid.GridItem; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; @@ -11,6 +9,7 @@ import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; import org.tizen.dynamicanalyzer.model.DAView; import org.tizen.dynamicanalyzer.nl.GLPageLabels; import org.tizen.dynamicanalyzer.resources.ColorResources; +import org.tizen.dynamicanalyzer.swap.model.probe2.LogData; import org.tizen.dynamicanalyzer.ui.opengl.data.GLSelectionData; import org.tizen.dynamicanalyzer.ui.opengl.ui.apiList.GLAPIListView; import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; @@ -52,11 +51,10 @@ public class GLContextView extends DAView { GridItem[] gridItems = (GridItem[]) data.getData(); DATableDataFormat tableDataFormat = (DATableDataFormat) gridItems[0] .getData(); - List tableDataList = tableDataFormat.getData(); + LogData logData = tableDataFormat.getLogData(); int frameIndex = ((GLSelectionData)data).getFrameIndex(); - String seq = tableDataList - .get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); + String seq = Integer.toString(logData.getSeq()); glContextTreeTable.updateTree(seq); viewContainer.setTitleText(GLPageLabels.GL_CONTEXT_VIEW_TITLE + "(" -- 2.7.4