summaryrefslogtreecommitdiffstats
path: root/libs/hwui/FrameInfoVisualizer.h
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-07-06 13:49:58 -0700
committerJohn Reck <jreck@google.com>2015-07-06 16:12:46 -0700
commitbe3fba05e823f740f65b2679929347dc3dd282ad (patch)
tree8dfd52f0e6297d009dd7e671ac8187a7dfac6996 /libs/hwui/FrameInfoVisualizer.h
parenta559590043e32f670813e062f042f9e642297edf (diff)
downloadframeworks_base-be3fba05e823f740f65b2679929347dc3dd282ad.zip
frameworks_base-be3fba05e823f740f65b2679929347dc3dd282ad.tar.gz
frameworks_base-be3fba05e823f740f65b2679929347dc3dd282ad.tar.bz2
Adjust for pipeline stalls
Bug: 20853441 Calculating duration that crosses the UI-RT sync point will now subtract out the time spent waiting in queue under the assumption that this time will be accounted for in the previous frame's metrics Change-Id: Ia8213f4410638840613f5ae439e98dfb77532a6a
Diffstat (limited to 'libs/hwui/FrameInfoVisualizer.h')
-rw-r--r--libs/hwui/FrameInfoVisualizer.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/hwui/FrameInfoVisualizer.h b/libs/hwui/FrameInfoVisualizer.h
index f1dc954..cf877c4 100644
--- a/libs/hwui/FrameInfoVisualizer.h
+++ b/libs/hwui/FrameInfoVisualizer.h
@@ -59,10 +59,8 @@ private:
void drawGraph(OpenGLRenderer* canvas);
void drawThreshold(OpenGLRenderer* canvas);
- inline float duration(size_t index, FrameInfoIndex start, FrameInfoIndex end) {
- nsecs_t ns_start = mFrameSource[index][start];
- nsecs_t ns_end = mFrameSource[index][end];
- float duration = ((ns_end - ns_start) * 0.000001f);
+ inline float durationMS(size_t index, FrameInfoIndex start, FrameInfoIndex end) {
+ float duration = mFrameSource[index].duration(start, end) * 0.000001f;
// Clamp to large to avoid spiking off the top of the screen
duration = duration > 50.0f ? 50.0f : duration;
return duration > 0.0f ? duration : 0.0f;