Unify DrawProfiler/JankStats

Bug: 20822400

Change-Id: I24345c3120440bfce14e8cbe7e880b39f10b744a
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index 8163b0f..8d54304 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -18,9 +18,9 @@
 #define CANVASCONTEXT_H_
 
 #include "DamageAccumulator.h"
-#include "DrawProfiler.h"
 #include "IContextFactory.h"
 #include "FrameInfo.h"
+#include "FrameInfoVisualizer.h"
 #include "RenderNode.h"
 #include "utils/RingBuffer.h"
 #include "renderthread/RenderTask.h"
@@ -103,7 +103,7 @@
     void stopDrawing();
     void notifyFramePending();
 
-    DrawProfiler& profiler() { return mProfiler; }
+    FrameInfoVisualizer& profiler() { return mProfiler; }
 
     void dumpFrames(int fd);
     void resetFrameStats();
@@ -140,12 +140,12 @@
 
     const sp<RenderNode> mRootRenderNode;
 
-    DrawProfiler mProfiler;
     FrameInfo* mCurrentFrameInfo = nullptr;
-    // Ring buffer large enough for 1 second worth of frames
-    RingBuffer<FrameInfo, 60> mFrames;
+    // Ring buffer large enough for 2 seconds worth of frames
+    RingBuffer<FrameInfo, 120> mFrames;
     std::string mName;
     JankTracker mJankTracker;
+    FrameInfoVisualizer mProfiler;
 
     std::set<RenderNode*> mPrefetechedLayers;
 };