From: Hyunjong.park Date: Tue, 5 Aug 2014 07:03:46 +0000 (+0900) Subject: opengl : print fps, frametime value of toolbar X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b48308c85b58a7013376232dcbb72779de6ee87d;p=sdk%2Ftools%2Fdynamic-analyzer.git opengl : print fps, frametime value of toolbar Signed-off-by: Hyunjong.park Change-Id: Id6e579c26d1f2eff8785566d3853522769b665b0 --- diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/chart/GLFrameTimeChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/chart/GLFrameTimeChart.java index 4f40c00..5fdb70d 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/chart/GLFrameTimeChart.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/chart/GLFrameTimeChart.java @@ -103,15 +103,15 @@ public class GLFrameTimeChart extends GLChart { public void parseLogPackage(LogPackage logPack) { } - public void addData(final int frameNumber, int frameTime, boolean isError) { - long fps = Math.round(TimelineConstants.KILO_LONG / (long) frameTime); - String tooltipMessage = fps + " fps"; + public void addData(final int frameNumber, int fps, boolean isError) { + double frameTime = (1 / (double) fps) * TimelineConstants.KILO_LONG; + String tooltipMessage = String.format("%.1f %s (%d fps)", frameTime, MS, fps); if (isError) { - frameTimeSeries.addSeriesItem(new DAChartSeriesItem(frameNumber, - frameTime, ColorResources.RED, tooltipMessage, false)); + frameTimeSeries.addSeriesItem(new DAChartSeriesItem(frameNumber, frameTime, + ColorResources.RED, tooltipMessage, false)); } else { - frameTimeSeries.addSeriesItem(new DAChartSeriesItem(frameNumber, - frameTime, tooltipMessage, false)); + frameTimeSeries.addSeriesItem(new DAChartSeriesItem(frameNumber, frameTime, + tooltipMessage, false)); } } }