summaryrefslogtreecommitdiffstats
path: root/libs/hwui/renderthread/RenderThread.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-02-19 14:36:50 -0800
committerJohn Reck <jreck@google.com>2015-03-18 14:22:01 -0700
commit2614bd225f84f7a23e6b30fc6b47bede153e5f4c (patch)
treeee9a807f2fd740b33410f8e540af95972d12fde0 /libs/hwui/renderthread/RenderThread.cpp
parent0d756f7d5646f84753a3db5f702f4ac79bda22bf (diff)
downloadframeworks_base-2614bd225f84f7a23e6b30fc6b47bede153e5f4c.zip
frameworks_base-2614bd225f84f7a23e6b30fc6b47bede153e5f4c.tar.gz
frameworks_base-2614bd225f84f7a23e6b30fc6b47bede153e5f4c.tar.bz2
DO NOT MERGE Backport of limited jank-tracking metrics
Bug: 19821830 Cherry-pick of ba6adf66d3c44c0aa2fd8a224862ff1901d64300 Cherry-pick of e70c5754d01f2ab0ff47ea3eabaa88aca5ed2a36 Change-Id: Id342fa0ab345f204bec58acf45ce72f6de950cfb
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.cpp')
-rw-r--r--libs/hwui/renderthread/RenderThread.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp
index 84826b7..7a8c3ce 100644
--- a/libs/hwui/renderthread/RenderThread.cpp
+++ b/libs/hwui/renderthread/RenderThread.cpp
@@ -143,7 +143,8 @@ RenderThread::RenderThread() : Thread(true), Singleton<RenderThread>()
, mFrameCallbackTaskPending(false)
, mFrameCallbackTask(0)
, mRenderState(NULL)
- , mEglManager(NULL) {
+ , mEglManager(NULL)
+ , mJankTracker(NULL) {
mFrameCallbackTask = new DispatchFrameCallbacks(this);
mLooper = new Looper(false);
run("RenderThread");
@@ -153,6 +154,11 @@ RenderThread::~RenderThread() {
LOG_ALWAYS_FATAL("Can't destroy the render thread");
}
+void RenderThread::setFrameInterval(nsecs_t frameInterval) {
+ mTimeLord.setFrameInterval(frameInterval);
+ mJankTracker->setFrameInterval(frameInterval);
+}
+
void RenderThread::initializeDisplayEventReceiver() {
LOG_ALWAYS_FATAL_IF(mDisplayEventReceiver, "Initializing a second DisplayEventReceiver?");
mDisplayEventReceiver = new DisplayEventReceiver();
@@ -169,6 +175,7 @@ void RenderThread::initThreadLocals() {
initializeDisplayEventReceiver();
mEglManager = new EglManager(*this);
mRenderState = new RenderState(*this);
+ mJankTracker = new JankTracker(mTimeLord.frameIntervalNanos());
}
int RenderThread::displayEventReceiverCallback(int fd, int events, void* data) {